• Hi,

    I have a client site where they want the “Add to Cart” changed to “Add to Order”.

    I have found some code via google that works well BUT there is a little issue. It also changes the Variable product buttons, where it used to say “Choose Options” and now says “Add to Order” on the Shop page which I don’t want to happen. Customers still need to see the “Choose OPtions” button before clicking on to choose their options in that product.

    So the code nearly works right except for that bit.

    Any ideas or code that other people have used that WON’T affect the “Choose Options” buttons.

    I found it from this site https://www.businessbloomer.com/woocommerce-rename-add-to-cart-button-label/

    /**
    
     * @snippet       Change "Add to cart" Button Label @ Woo Shop / Single
    
     * @tutorial      Get CustomizeWoo.com FREE
    
     * @author        Rodolfo Melogli
    
     * @compatible    WooCommerce 8
    
     * @community     Join https://businessbloomer.com/club/
    
     */
    
    add_filter( 'woocommerce_product_single_add_to_cart_text', 'bbloomer_custom_add_cart_button', 9999 );
    
    add_filter( 'woocommerce_product_add_to_cart_text', 'bbloomer_custom_add_cart_button', 9999 );
    
    functionbbloomer_custom_add_cart_button() {
    
       return'Buy Now!';
    
    }

    THanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey there, @kristinubute! Thanks for contacting us.

    While we can’t provide support for code customization as per our support policy, we do our best to offer advice and direct you to appropriate resources.

    You can visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there too.

    I’m going to leave it open for a bit to see if anyone is able to chime in and help you out further.

    Please let us know if there’s anything else we can do to help or if you have any questions.

    Have a wonderful day!

    Thread Starter kristinubute

    (@kristinubute)

    Hi

    I’ve found this code in YOuTube and works. It does change the “Select Options” button also which I didn’t want but I can’t seem to find a workaround.

    It changes all the Add to Cart buttons to now Add to Order.

    // Code Start // To change add to cart text on single product page add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘woocommerce_custom_single_add_to_cart_text’ ); function woocommerce_custom_single_add_to_cart_text() { return __( ‘Buy Now’, ‘woocommerce’ ); // Replace “By Now” text with your own text } // To change add to cart text on product archives(Collection) page add_filter( ‘woocommerce_product_add_to_cart_text’, ‘woocommerce_custom_product_add_to_cart_text’ ); function woocommerce_custom_product_add_to_cart_text() { return __( ‘Buy Now’, ‘woocommerce’ ); // Replace “By Now” text with your own text } // Code End

    Hello @kristinubute,

    Thanks again for reaching out.

    Just as my colleague had earlier shared, helping out with custom coding of this nature is outside the scope of support.

    However, I would recommend the following:

    Running the exact question you’re asking, along with the code provided, through an AI platform like ChatGPT for recommendations/changes to your code.

    Hope it helps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need to rename “Add to Cart” button to be “Add to Order”’ is closed to new replies.