Change WooCommerce Out of Stock Message

Add this PHP to the end of your child themes functions file or custom code snippets plugin.

add_filter('woocommerce_out_of_stock_message', 'custom_out_of_stock_message');
function custom_out_of_stock_message() {
    return __('Your Custom Out of Stock Message.', 'woocommerce');
}

Once you install the code, change the ‘Your Custom Out of Stock Message.’ text within the single quotes to anything you like. Do NOT remove the single quotes.

You can extend this code to do anything you like.

Need More Coding Help?

Book a Consultation