Woocommerce?|?add “sold out” text to variants
-
Hi guys,
I’ve read countless threads and tried multiple different ways to add a simple “sold out” text to unavailable variants in the drop down menu. No success so far.
I’ve managed to gray out unavailable variants with this code I found:
function wcbv_variation_is_active( $active, $variation ) { if( ! $variation->is_in_stock() ) { return false; } return $active; } add_filter( 'woocommerce_variation_is_active', 'wcbv_variation_is_active', 10, 2 );
Perhaps there’s a way to not just gray out but add text as well? Unfortunately I’m not versatile enough to do it myself, so I’m hoping for some knowledgeable inputs from some people more capable than me ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Woocommerce?|?add “sold out” text to variants’ is closed to new replies.