Support » Plugin: WooCommerce Product Archive Customiser » Change "Out of Stock" Text on Archive Products with "Sold"

  • I can easily change the “Out of Stock” text on the individual product page to “Sold” using the following snippet in my functions file:

    <?php
    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;
    }
    ?>

    How would I change the text on each product archive element to “Sold”?

    http://wordpress.org/plugins/woocommerce-product-archive-customiser/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change "Out of Stock" Text on Archive Products with "Sold"’ is closed to new replies.