How to Add a “Read More/LessR...
Enhance your MyListing website’s single listings with the Description Field Rea...

WPCodeBox
178

By default, WooCommerce only loads 30 variations on the front-end for variable products. If your product has more variations than that, WooCommerce will not fetch them until they’re selected in the drop-downs – which means that unavailable variations will show up in the drop-downs. This snippet loads 100 variations on the front end, improving your WooCommerce product display and variation threshold.
<?php
if ( ! function_exists( 'wpcodebox_wooco_variation_threshold' ) ) {
function wpcodebox_wooco_variation_threshold ( $amount, $product ) {
return 100; // change this to the amount of variations you want to load
}
}
add_filter( 'woocommerce_ajax_variation_threshold', 'wpcodebox_wooco_variation_threshold', 10, 2 );





