Pass product to woocommerce_ajax_variation_threshold

This commit is contained in:
Mike Jolley 2015-07-09 16:31:46 +01:00
parent 9531258ee6
commit 60193c7861
1 changed files with 1 additions and 1 deletions

View File

@ -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(