Skip to content

Instantly share code, notes, and snippets.

@AchalJ
Created July 14, 2015 11:04
Show Gist options
  • Save AchalJ/eac4658819659169fb17 to your computer and use it in GitHub Desktop.
Save AchalJ/eac4658819659169fb17 to your computer and use it in GitHub Desktop.
WooCommerce: Change Out of Stock text
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'] = __('Currently Unavailable', 'woocommerce');
}
return $availability;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment