woocommerce offtopic – Problem with showing more than 2k variations

Question

I have product with 2430 variations (don’t ask is it necessary, contact lenses have a lot of variations, and shop owner insist in one product).
In front end, all possible variations are loaded in combo boxes, so buyer can choose non-existing combination instead of only existing combinations.

Any ideas will be appreciated.
Thanks in advance.

Regards,
Marko

Current environment:
WP 5.7,
Woocommerce 5.1.0,
Shopkeeper theme,
PHP 7.3

Till now i have tried with this (one by one) to make it work:

  • Disabled all plugins
  • Variation swatches plugin (tried with Ajax trashold 1 and 80)
  • Try with default theme
  • Changed PHP from 7.0 to 7.4
  • Changing max_execution_time in PHP.ini up to 25000
  • Adding code to theme’s functions.php
function wc_ajax_variation_threshold_modify( $threshold, $product )
{
  $threshold = 2500;
  return  $threshold;
}

add_filter( 'woocommerce_ajax_variation_threshold', 'wc_ajax_variation_threshold_modify', 10, 2 );```

0
Marko 4 months 2021-03-27T09:12:21-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse