Skip to content

Instantly share code, notes, and snippets.

@Giannisduke
Last active September 30, 2020 09:44
Show Gist options
  • Save Giannisduke/28e40b499a38deede5d08799a97adab0 to your computer and use it in GitHub Desktop.
Save Giannisduke/28e40b499a38deede5d08799a97adab0 to your computer and use it in GitHub Desktop.
woocommerce - Remove Stock message from Product
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