Skip to content

Instantly share code, notes, and snippets.

@jcamp
Forked from barbwiredmedia/woocommerce.php
Created July 6, 2018 17:48
Show Gist options
  • Save jcamp/c53914e00e6215331b93e670f094dc2d to your computer and use it in GitHub Desktop.
Save jcamp/c53914e00e6215331b93e670f094dc2d to your computer and use it in GitHub Desktop.
wordpress woocommerce out of stock
// Woo commerce change out of stock text
add_filter('woocommerce_get_availability', 'availability_filter_func');
function availability_filter_func($availability)
{
$availability['availability'] = str_ireplace('Out of stock', 'This item is currently out of stock. Please check back again at a later date.', $availability['availability']);
return $availability;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment