Created
August 22, 2017 08:37
-
-
Save kreamweb/b905cead9772625d868b47c2551ca863 to your computer and use it in GitHub Desktop.
Multiple subscription products on cart
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 | |
| if ( function_exists( 'YITH_WC_Subscription' ) ) { | |
| add_filter( 'woocommerce_add_to_cart_validation', 'custom_woocommerce_add_to_cart_validation', 1 ); | |
| function custom_woocommerce_add_to_cart_validation ( $validation ) { | |
| remove_filter( 'woocommerce_add_to_cart_validation', array( | |
| YITH_WC_Subscription(), | |
| 'cart_item_validate' | |
| ), 10 ); | |
| return $validation; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment