kreamweb
8/22/2017 - 8:37 AM

Multiple subscription products on cart

Multiple subscription products on cart

<?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;
	}
}