Skip to content

Instantly share code, notes, and snippets.

@techskilled
Created August 24, 2016 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techskilled/daae280f8f26f6f8f5ea9992916d06ab to your computer and use it in GitHub Desktop.
Save techskilled/daae280f8f26f6f8f5ea9992916d06ab to your computer and use it in GitHub Desktop.
WooCommerce change out of stock text to sold
add_filter('woocommerce_get_availability', 'availability_filter_func');
function availability_filter_func($availability)
{
$availability['availability'] = str_ireplace('Out of stock', 'Sold', $availability['availability']);
return $availability;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment