Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #294097

    Hi, I would like to change the title of the Cart to something else to customize the site. Where ever it says “Cart” I want it to say something else.

    eg. “Add to Cart” to “Add to Purse
    “View Cart” to “View Purse”


    Where and how can I do that?


    Hi g7studios!

    Thank you for using our theme.

    If you are using the theme not in english (e.g. in German) you have a translation file for woocommerce. You can edit the translation file (.mo, .po e.g. with poedit).

    If you are using it in english you have to look in the source code of woocommerce plugin. For some, but not all, there are filterhooks to change the text e.g.

    in woocommerce/templates/checkout/form-pay.php you find:

    $pay_order_button_text = apply_filters( 'woocommerce_pay_order_button_text', __( 'Pay for order', 'woocommerce' ) );

    To change this, put in functions.php or in the child theme functions.php:

    add_filter('woocommerce_pay_order_button_text', 'my_woocommerce_pay_order_button_text', 10, 1);
    function my_woocommerce_pay_order_button_text($wc_text)
    return 'my_new_text';

    Otherwise you only can chenge the original text in the php files.




    Thanks for the reply. I tried the above explanation but it didn’t work. Was your answer specifically answering my question or is it just an example. I wasn’t clear.



    Please try this instead to change the “Add to cart” button to “Add to Purse”.

    add_filter( 'add_to_cart_text', 'woo_custom_cart_button_text' );                            
    add_filter( 'woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text' );  
    add_filter( 'woocommerce_product_add_to_cart_text', 'woo_custom_cart_button_text' ); 
    function woo_custom_cart_button_text() {
            return __( 'Add to Purse', 'woocommerce' );


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.