If you’re using WooCommerce to sell products on your WordPress site, you may want to change the “View Cart” link text to something else. By default, this link appears in the header area of your site, next to the “Cart” icon.
Changing the “View Cart” link text is a relatively simple process, and can be done with just a few lines of code. In this article, we’ll show you how to change the “View Cart” link text in WooCommerce.
Here’s how to change the “View Cart” link text in WooCommerce:
1. Log into your WordPress site and go to the Dashboard.
2.
On the Dashboard, hover over the Appearance menu item and click on Editor.
3. On the Edit Themes page, locate and open the file called header.php.
4. Find the line of code that says “echo sprintf( _n( ‘%d item’, ‘%d items’, WC()->cart->get_cart_contents_count(), ‘textdomain’ ), WC()->cart->get_cart_contents_count() );?> – cart->get_cart_total(); ?>” and replace it with the following:
cart->get_cart_contents_count(), ‘textdomain’ ), WC()->cart->get_cart_contents_count() );?> – cart->get_cart_total(); ?>
5. Save your changes and close the file.
That’s all there is to it! You have successfully changed the “View Cart” link text in WooCommerce.