• Resolved EndAllDisease1

    (@endalldisease1)


    How do I change the sold out message on a woocommerce sales page?

    Currently it says “just sold out. expect to come in 4-6 days” and that’s not true so I get all sorts of emails about it.

    There are a number of posts out there on this subject which recommend the following code, but it did not work:

    add_filter('woocommerce_get_availability_text', 'themeprefix_change_soldout', 10, 2 );
     /**
      * Change Sold Out Text to Something Else
      */
    function themeprefix_change_soldout ( $text, $product) {
        
        if ( !$product->is_in_stock() ) {
            $text = '<div class="alert-info">You missed us - sold out already! If you’d like us to produce more stock then drop us a line and let us know. </div>'; 
            } 
        return $text; 
    }

    How do I make this happen?
    Best,
    Mark

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How do I change the Woocommerce Sold Out Message?’ is closed to new replies.