Last active
September 30, 2020 09:44
-
-
Save Giannisduke/28e40b499a38deede5d08799a97adab0 to your computer and use it in GitHub Desktop.
woocommerce - Remove Stock message from Product
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_wc_hide_in_stock_message( $html, $product ) { | |
if ( $product->is_in_stock() ) { | |
return ''; | |
} | |
return $html; | |
} | |
add_filter( 'woocommerce_get_stock_html', 'my_wc_hide_in_stock_message', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment