Created
June 20, 2018 00:21
-
-
Save ideadude/9aaccf5cb4433004d0147633c47e8d35 to your computer and use it in GitHub Desktop.
Disable the PMPro WooCommerce filter that restricts carts to only 1 membership product at a time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Disable the PMPro WooCommerce filter that restricts carts | |
* to only 1 membership product at a time. | |
* Add this code into a custom plugin. | |
*/ | |
function disable_pmprowoo_is_purchasble_filter() { | |
remove_filter( 'woocommerce_is_purchasable', 'pmprowoo_is_purchasable', 10, 2 ); | |
} | |
add_action( 'init', 'disable_pmprowoo_is_purchasble_filter' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Brilliant, thank you for this!!