auto registering someone in membership 2 after they pay for something in woocommerce

I have support access on for

We use the NMI Payment gateway plugin for woocommerce. The shop page is here:

We also have the wpmu dev membership 2 pro plugin.

Is there a way after someone makes the purchase using woocommerce that someone can automatically be registered in membership 2 pro?