Change wording of 'view cart'

Good morning,

I have a Pro / Woocommerce site which I have the ‘cart’ and ‘checkout’ on the same page. So when the user adds a product it comes up with the default blue strip with the term ‘view cart’ - how can I change that to ‘view cart and checkout’?

Thank you!
Jason

Hey Jason,

Please install and activate the child theme and login through FTP then edit the functions.php then add this code:

// Translate Strings
add_filter( 'gettext', 'translate_x_strings', 20, 3 );

function translate_x_strings( $translated_text, $text, $domain ) {

        switch ( $translated_text ) {

            case "View cart" :

                $translated_text = __( 'View cart and checkout', '__x__' );
                break;
        }

    return $translated_text;
}

Kindly note that since this is a custom code that changes the default behavior/display of the theme, you will be responsible to maintain or update the code in case you require further changes or if the code stops working in future updates. If you are uncertain how to proceed, it would be best to get in touch with a developer.

Hope this helps.

This is perfect thank you!

You’re most welcome, @hyperdrive_boom.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.