Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG / Conflict Coupon Code plugins break purchasing Membership Product #179

Open
kimwhite opened this issue Jan 13, 2023 · 2 comments
Open

Comments

@kimwhite
Copy link

kimwhite commented Jan 13, 2023

When activating a Coupon Plugin for WooCommerce (we have tested 3, Conditional Discounts for WooCommerce by ORION, Smart Coupons For WooCommerce Coupons, and WooCommerce Smart Coupons an error message appears when you place a PMPro Membership Level Production in the cart then view the cart (see image). Nothing is configured, and no coupon is used; simply the act of the coupon plugin being activated causes this error to appear.
"'Your Product Name' has been removed from your cart because it can no longer be purchased. Please contact us if you need assistance."

*if you put a regular product in THEN a membership it works.

Screenshot 2023-01-13 at 4 49 10 PM

https://capture.dropbox.com/DgKcjZuS1QgnXnYK

@andrewlimaza
Copy link
Collaborator

andrewlimaza commented Jan 23, 2023

The issue looks like these coupon plugins are loading things on hooks that we rely on and it's creating false positives. We are investigating this.

For now you can silence this false/positive by using the following function:

function my_disable_pmpro_woo_is_purchasable() {
    remove_filter( 'woocommerce_is_purchasable', 'pmprowoo_is_purchasable', 10, 2 );
}
add_action( 'init', 'my_disable_pmpro_woo_is_purchasable' );

@andrewlimaza
Copy link
Collaborator

Upon further inspection these plugins are doing something to the is_purchasable and loading it multiple times on the checkout which is making the woocommerce_is_purchasable running more than once which is triggering a false on checkout.

I think the plugins in question should try to resolve this issue as it's out of our control and would be quite 'hacky' for us to figure things out. I am going to leave this open so we can circle back to this once we get a chance but I recommend disabling this notification and functionality as per the code snippet above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants