fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Pages with many variations load slow

Pages with a lot of variations take 10 or more seconds to load. Please see this page:

Cardiff Cashmere “Classic” – Dream Weaver Yarns LLC

Thank you for your help.

If I change the Swatches Setting in the product to drop “Dropdown to Image” = No, the page loads. However, this is not ideal. The pluggin had worked fine for a long time. So some update must have done something cause this error.

Here is a product that did not load until I changed the “Dropdown to Image” = No

Lana Grossa Ecopuno Yarn – Dream Weaver Yarns LLC

Hakik Zaman

Hi Natalie,

Thanks for reaching out to us.

We use the API fetch system to retrieve the Swatches data. Perhaps it loads on your server. As you say you have a high number of variations.

You can use Redis Object Cache if your server supports it.

Please contact your hosting support and ask them if they have Redis Object Cache support.

If so, ask them to enable it for you and install a plugin called Redis Object Cache.

Our plugin is compatible with the Redis Object Cache.

If the above doesn’t help, please add the following snippet using a plugin called Code Snippets. You can also add the snippet using the current theme’s functions.php file-

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

Note: It is recommended to add the Custom Code to the child theme’s functions.php file, to avoid any data loss while updating the Parent Theme.

Thank You