Last active
September 16, 2019 09:57
-
-
Save daviddunnington/97804707b2598fd543ba4998cba27e2d to your computer and use it in GitHub Desktop.
Woocommerce out of stock HTML filter product page
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 filter_woocommerce_get_stock_html( $html, $product ) { | |
if ( $product->stock_status == 'outofstock' ) { | |
$html .= 'Add custom HTML here'; | |
} | |
return $html; | |
} | |
add_filter( 'woocommerce_get_stock_html', 'filter_woocommerce_get_stock_html', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment