设法解决了我自己的问题。
只需将以下内容粘贴到函数中即可。php
function custom_wc_ajax_variation_threshold( $qty, $product ) {
return 10;
}
add_filter( \'woocommerce_ajax_variation_threshold\', \'custom_wc_ajax_variation_threshold\', 10, 2 );
然后更改“return 10;”无论你有多少变化。
Please note this may slow down page loading time depending on your hosting.