Pass product to woocommerce_ajax_variation_threshold
This commit is contained in:
parent
9531258ee6
commit
60193c7861
|
@ -880,7 +880,7 @@ if ( ! function_exists( 'woocommerce_variable_add_to_cart' ) ) {
|
|||
wp_enqueue_script( 'wc-add-to-cart-variation' );
|
||||
|
||||
// Get Available variations?
|
||||
$get_variations = sizeof( $product->get_children() ) <= apply_filters( 'woocommerce_ajax_variation_threshold', 20 );
|
||||
$get_variations = sizeof( $product->get_children() ) <= apply_filters( 'woocommerce_ajax_variation_threshold', 20, $product );
|
||||
|
||||
// Load the template
|
||||
wc_get_template( 'single-product/add-to-cart/variable.php', array(
|
||||
|
|
Loading…
Reference in New Issue