I have a variable product with 238 variations (7 sizes and 34 colours).
We are using the Bulk Variation Forms plugin for the single shop page.

The problem is that with 238 variations, the WooCommerce ->get_available_variations() method takes an extremely long time (minimum of 5s and as long as 10-20s). This makes the page loading speed unacceptable.

How can I improve the page loading?

  • on which page do you use get_available_variations() ? – mmm Oct 24 '17 at 11:34
  • On the single product page. – l_nxy Oct 24 '17 at 14:24
  • on the save_post action, you can cache the result of the method in a metavalue. after that you can change the action woocommerce_variable_add_to_cart in order to use this metavalue. – mmm Oct 24 '17 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.