Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • WooCommerce- How to change Add to cart Text in WordPress

    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 735
    Comment on it

    Hello readers!
    Changing Add to Cart Text is not a big issue, below I am providing the method to change this text to your cart.
    So, to change add to cart text you can use single_add_to_cart_text filter, after adding the filter connect it to your own function and in your function return the text of your choice for i.e ('This is my button text') you can replace this text and set according to your wish.

    Here is the sample code below-

    <?php
    add_filter('single_add_to_cart_text', 'add_custom_button_text');
    function add_custom_button_text()
    {
    return_('This is my button text', 'woocommerce');
    }
    ?>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: