• Resolved peeeeeeenats

    (@peeeeeeenats)


    I want to edit words words and link of “add to cart” button.
    I want to change the “add to cart” button to “Contact” button.
    Please teach me how to do.

    • This topic was modified 6 years, 9 months ago by peeeeeeenats.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,

    this is possible with some custom code

    // 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' ); 
    }
    
    // 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' );
    }

    or with a plugin

    https://wordpress.org/plugins/wc-custom-add-to-cart-labels/

    EDIT: I just see that you also want to change the URL, then you can view this

    https://businessbloomer.com/woocommerce-custom-add-cart-urls-ultimate-guide/

    Regards

    • This reply was modified 6 years, 9 months ago by crslz.
    Thread Starter peeeeeeenats

    (@peeeeeeenats)

    Hi,Thank you so much, crslz.

    I can change words of button by plugin you taught.

    But I don’t know how to change link of button.

    Im a beginner at PHP etc..
    So I want to use plugin as possible as.

    Can I edit link of button too by plugin?

    • This reply was modified 6 years, 9 months ago by peeeeeeenats.
    Thread Starter peeeeeeenats

    (@peeeeeeenats)

    hey, I could do it.

    Settings > Products > General
    Checked “Redirect to the cart page after successful addition”.
    ↓
    Advanced
    Changed ”Cart page” to a contact page I made.

    But next, I want to delete increment decrement button…

    If you know how to delete this, please teach me…!

    > I want to delete increment decrement button…

    If you are wanting to remove the quantity selection for a product (which increments/decrements the quantity that people are putting in their cart), you can edit the product in Products > All Products and click on the Inventory tab, then select the option Sold Individually, like shown in this screenshot:

    Screenshot: https://cache.nicola.blog/wp-content/uploads/2018/05/image-2.png

    Thread Starter peeeeeeenats

    (@peeeeeeenats)

    To:NickGreen

    wow I successed!
    Thank you for you!!

    Thread Starter peeeeeeenats

    (@peeeeeeenats)

    Resolved.
    Thank you for crslz and NickGreen.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘I want to edit “Add to cart” button’ is closed to new replies.