• Not really help needed but just some thoughts and feature request.

    “out-of-stock” style (blur, cross over image) is only taking into account “non-existing” variations, instead of “out-od-stock”. Out-of-stock variations still appear as selectable.
    It’s possible to mimic the behaviour using following code in functions.php:

    function vbm_variation_is_visible( $visible, $variation_id, $product_id, $variation ) {
     if( ! $variation->is_in_stock() ) {
     return false;
     }
     return $visible;
    }
    add_filter( 'woocommerce_variation_is_visible', 'vbm_variation_is_visible', 10, 4 );

    But then there will be no difference between “out-of-stock” variations and “unavailable” variations.

    It would be useful a way to make a real difference between “out-of-stock” and “unavailable” variations. For example, instead of a red cross over, it could be a “stamp” with text such as “out-of-stock”, just changing the ::before and ::after content used for the red cross. But first it’s needed to make a difference between those variations.

    • This topic was modified 4 years, 1 month ago by Navarro.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Out of stock style misleading’ is closed to new replies.