Hi Nguyen,
Thanks for reaching out to us.
Could you record me reproducing your issue using a tool like this? https://www.useloom.com
It helps me to quickly figure out the issue.
Thank you
Hi Nguyen,
Thanks for reaching out to us.
Could you record me reproducing your issue using a tool like this? https://www.useloom.com
It helps me to quickly figure out the issue.
Thank you
My English is not well, I can’t talk while recording the video, you can watch the video I recorded with my phone, when I switch variation, it shows the loading icon, it seems to call wc-ajax=get_variation
https://www.loom.com/share/d5bc8ac4d6994765a440c39e25a15d7f
Hi Nguyen,
Unfortunately, it is the default behavior of WooCommece.
The AJAX call will be fired when a product has 30 variations or more.
So it could cause your site to slow if you increase the threshold.
You can try the following snippet using the Code Snippets plugin:
add_filter( 'woocommerce_ajax_variation_threshold', 'woo_variation_swatches_global_ajax_variation_threshold_min', 10, 2 );
function woo_variation_swatches_global_ajax_variation_threshold_min( $size, $product ){
return 100;
}
Note: It is not recommended, do it at your own risk. No objection will be granted if you face any issues regarding this.
Thank You
Disable Ajax Variation Threshold not working
Nguyen Dung
I add this code to child theme’s functions.php but it now work
add_filter( 'woo_variation_swatches_global_ajax_variation_threshold_max', 'woo_variation_swatches_global_ajax_variation_threshold_max_edit', 10, 2 );
function woo_variation_swatches_global_ajax_variation_threshold_max_edit( $size, $product ){
return 700;
}
You can check it here:
https://gearcustoms.com/product/halloween-mom-to-be-mommys-little-bump-kin-personalized-t-shirt-gift-for-expecting-mom/