Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @mathiew200,

    Would you please try adding the following CSS code in Appearance > Customize > Additional CSS

    .ast-shop-product-out-of-stock {
    	display: none;
    }

    I hope that will help. Feel free to reach out to us if you have any further queries.

    Kind regards,
    Herman ??

    vioja132

    (@vioja132)

    Thank you,

    It worked nicely.

    Looking for the same, but I would like to do it via my child’s functions instead of css. Found this code snippet which works well on Storefront theme, but not on Astra:

    function my_wc_hide_in_stock_message( $html, $text, $product ) {
    	$availability = $product->get_availability();
    	if ( isset( $availability['class'] ) && 'in-stock' === $availability['class'] ) {
    		return '';
    	}
    	return $html;
    }
    add_filter( 'woocommerce_stock_html', 'my_wc_hide_in_stock_message', 10, 3 );

    Could you please tell me how to modify the code in order to work with Astra?
    Thank you.

    Hi @newshop,

    With the Storefront theme, actually, there’s no “Out of Stock” label on the Shop page for the out-of-stock product.

    Regarding the code itself, the CSS code is the easiest and fastest one. If you prefer to use custom PHP, let’s see if we have a kind developer in the community who will help with that.

    Kind regards,
    Herman ??

    @bsfherman Thanks, but I switched to another theme in the meantime.

    Greeting. I have the same problem, I entered this code that you wrote but it still stands. I use the OceanWp theme.

    how to remove OUT OF STOCK label. i use OceanWp theme. Thanks in advance

    Hi @neca11,

    This forum is intended for the Astra theme users. If you are using the OceanWP theme, then please create a topic in OceanWP forum.

    Kind regards,
    Herman ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to Remove / Hide OUT OF STOCK label’ is closed to new replies.