Hide variations that don't match Woocommerce

前端 未结 1 701
孤独总比滥情好
孤独总比滥情好 2021-01-18 17:43

So I\'m currently working on a Woocommerce store that has lots of variations.

What I\'m basically looking for is for the next variation to refresh based on what was

相关标签:
1条回答
  • 2021-01-18 18:33

    It's default function for not many variations. For many variations you can do it with function

        // Woo Commerce – Make Variations only appear when available
    function custom_wc_ajax_variation_threshold( $qty, $product ) {
    return 500;
    }
    
    add_filter( ‘woocommerce_ajax_variation_threshold’, ‘custom_wc_ajax_variation_threshold’, 10, 2 );
    
    0 讨论(0)
提交回复
热议问题