$woocommerce- cart- get cart url() not working

$woocommerce- cart- get_cart_url() not working

I have already tried about 20 different methods to get this working with no solution.

I am trying to change the classes of the buttons in the WooCommerce mini cart widget as shown below.

The mark up for those buttons is written in two functions inside the wc-template-functions.php file:

What is the correct way to override these functions within my own theme so that i can change the classes of those two buttons?

Not sure if you still need help with this but this might help others in your situation.

If you want to change the class of the

tag in your example, the file you need to edit can be found in /wp-content/plugins/woocommerce/templates/cart/mini-cart.php

Obviously, don’t directly edit the file. Copy it in to your theme (or preferably child theme) folder under /wp-content/themes/your-theme-folder/woocommerce/cart/mini-cart.php and you can edit line #75 to put in your own CSS class(es). Line #75 reads:

You’ll need to clear your browser cache or add another item to the cart to see the changes as the cart content is saved in the browsers sessionStorage to avoid pulling a new copy on every page.

Leave a Reply

Your email address will not be published. Required fields are marked *