admin管理员组文章数量:1387429
I have 2 products with different properties.
1 product has 5 variations configured and the other 120.
However, the maximum possible variations for both products are 144 (not all variations are configured).
We notice that the product with 5 variations only shows the 5 variations (so other variations cannot be chosen in the listbox).
But for the product with 120 variations it shows the 144 variations.
This sometimes leads to the message "Sorry, this product is not available. Pick another combination".
Is it possible for product 2 to only have the 120 configured varations show up in the listbox?
I have 2 products with different properties.
1 product has 5 variations configured and the other 120.
However, the maximum possible variations for both products are 144 (not all variations are configured).
We notice that the product with 5 variations only shows the 5 variations (so other variations cannot be chosen in the listbox).
But for the product with 120 variations it shows the 144 variations.
This sometimes leads to the message "Sorry, this product is not available. Pick another combination".
Is it possible for product 2 to only have the 120 configured varations show up in the listbox?
1 Answer
Reset to default 0We found it ourselves, this is the solution.
Add the following snippet in functions.php
function wc_increase_variation_threshold( $product ) {
return 500;
}
add_filter( 'woocommerce_ajax_variation_threshold', 'wc_increase_variation_threshold', 10, 2 );
本文标签: WooCommerce hide unexisting variations
版权声明:本文标题:WooCommerce hide unexisting variations 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744561622a2612804.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论