• Resolved nikolov987

    (@nikolov987)


    Hello

    Now I have 575 products and every one of them have 170 variations.
    When I create 171 variation the product breaks and show all variations. When I delete one variation and 170 variations remain, everything is fine and the variations are displayed correctly.
    I obviously have a limit to 170 product variations.

    I tried that:

    1. I increased the parameters of “max_input_vars” from PHP to 80000, but there was no result.

    2. I increased the value of “woocommerce_rest_batch_items_limit” from 100 to 300 from (wordpress/plugin/woocommerce/includes/abstract/abstract-wc-rest-controller ) but there was no result.

    3. I put these codes in my child theme in function.php but there was no result.

    a)

    function custom_wc_ajax_variation_threshold( $qty, $product ) {
    	return 300;
    }
    add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 100, 2 );

    b)

    add_filter( 'woocommerce_ajax_variation_threshold', 'ww_ajax_variation_threshold', 10, 2 );
    
    function ww_ajax_variation_threshold( $default, $product ) {
    	return 150;
    }

    I use WordPress 5.2.2 and Woocommerce 3.6.5.

    How to increase product variation limit in woo commerce or I have another problem and how can I fix it?

    Best regards,
    Nikolov

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Hi there,

    You were definitely on the right track there; In point 2b), you had the following:

    
    add_filter( 'woocommerce_ajax_variation_threshold', 'ww_ajax_variation_threshold', 10, 2 );
    
    function ww_ajax_variation_threshold( $default, $product ) {
    	return 150;
    }
    

    The limit you specified is 150; You’ll want to increase that to 171+ ??

    Thread Starter nikolov987

    (@nikolov987)

    Hello,

    Now everyone is working.

    Thank you!

    Best regards,
    Nikolov

    Plugin Support RK a11n

    (@riaanknoetze)

    Woop Woop – glad you got that sorted ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to increase product variation limit in woo commerce?’ is closed to new replies.