How to Disable the Attachment Page in ...
WordPress Is Creating Attachment Pages You Don’t Need, you can Stop That with Code
...

WPCodeBox
432
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 );





