How to handle color of variation?
-
Hi WooCommerce, i trying to change variation dropdown text color depending from their stock and backorder sellection.
So i want, if variation is “out of stock”, and “allow backorder but notify” is selected into variation settings, then color to variation text to change to yellow, but dont know to do that. I have this function:
add_filter( 'woocommerce_variation_is_active', 'yellow_variations_when_is_backorder', 10, 2 ); function yellow_variations_when_is_backorder( $grey_out, $variation ) { if ( ! $variation->is_in_stock() && $variation->backorders_require_notification() ) $grey_out = true; // Here something need to change? return $grey_out; // Here something need to change? }
So wait for your instructions how to handle that $gray_out function.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to handle color of variation?’ is closed to new replies.