• Hello – We have backorders allowed with notify customer, however we do not want the (can be backordered) message to display on product pages. Is there a code snippet we can use to change or remove this text? It is a bit confusing for customers..

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Use a plugin like Loco Translate or “Say What” for changing the text.

    Hi,
    I am also interested to know how to remove backorder message . I was able to replace the text with empty string by following filter but i was not able to remove parenthesis .

    add_filter( 'woocommerce_get_availability', 'backorder_text', 10, 2);
    function backorder_text($available) {
         return str_replace('also available on backorder', '', $available);
    }

    SO you can replace that text with your own text easily with this.

    add_filter( 'woocommerce_get_availability', 'backorder_text', 10, 2);
    function backorder_text($available) {
         return str_replace('also available on backorder', 'Custom text here', $available);
    } 

    Please write here if you got any solution.
    Thanks

    • This reply was modified 7 years, 6 months ago by Mijankarim.
    Thread Starter bt_dev

    (@biotrace)

    Hi Mijankarim – The filter you suggested works perfectly for what I needed to do. Thanks!

    Beth

    (@pedalkraft)

    Hi both –

    I too want to remove this confusing message. Thanks for this solution! Can you let me know, do you put this in the functions folder, or if not, where is it placed?

    Thanks so much

    Hi Pedalkraft,

    Yes , you have to put that on functions.php file inside your theme folder.
    You can add at the bottom of that file.
    Thanks

    Thread Starter bt_dev

    (@biotrace)

    Hi there – We use the following plugin. It makes it very easy to manage code snippets for functions.php

    https://www.ads-software.com/plugins/code-snippets/

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to change “In Stock (can be backordered)” message on product pages?’ is closed to new replies.