Created
February 15, 2017 03:01
-
-
Save harishankerr/bce6b0dfc0e7157a45b251a479fd52ff to your computer and use it in GitHub Desktop.
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
add_filter( 'woocommerce_get_availability', 'wcs_custom_get_availability', 1, 2); | |
function wcs_custom_get_availability( $availability, $_product ) { | |
// Change Out of Stock Text | |
if ( ! $_product->is_in_stock() ) { | |
$availability['availability'] = __('Sold Out', 'woocommerce'); | |
} | |
return $availability; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment