We have followed the instructions on installing PMPro as well as its Woocommerce Add-on. Then we added the custom code (from 2016) in our child themes functions.php.
We set up a membership level in PMPro.
We created a product in Woocommerce an associated it with the PMPro Membership level.
We then removed associated products from selected courses and selected the created PMPro membership in the course pricing settings for these courses.
When we click on "take this course" it redirects to the membership selection page where we can select the PMPro membership. It then redirects to the Woocommerce checkout as expected.
However once inside the checkout we get the following error message:
"Membership has been removed from your cart because it can no longer be purchased. Please contact us if you need assistance."
and we then can't complete the checkout.
Please take a look. We will provide logins in the next post.
This reply has been marked as private.
Well this error " Membership has been removed from your cart because it can no longer be purchased. Please contact us if you need assistance " actually not coming from our code .
Our code is to redirect the user from take this course to pmpro membership actually .
After this pmpro and woocommerce take control .
Its the pmpro plugin which is causing this error. Please check with pmpro support on this .