A simple, powerful and independent e-commerce platform.
Sell anything with ease.

Replace ‘out of stock’ message by ‘sold’

Replace the message that shows when an item is out of stock to instead mark the product as sold.

 * Replace out of stock message by sold

add_filter('woocommerce_get_availability', 'cc_change_availability_to_sold');

function cc_change_availability_to_sold($availability) {

  $availability['availability'] = str_ireplace('Out of stock', 'Sold', $availability['availability']);
  return $availability;

View Raw Code ID: 91108