Back button / Return button link to shop page woocommerce

If you would like to show the Back to Shop button on the single product page, than use this following line of code at the end of your theme’s functions.php file of your active child theme (or theme) and Save the file. add_action( ‘woocommerce_after_add_to_cart_button’, ‘custom_go_back_shop’, 10 ); function custom_go_back_shop() { global $product; echo ‘ Back […]

Woocommerce Add To Cart Button Redirect To Cart Page

Now, I discuss how to Add To Cart Button Redirect To Cart Page in Woocommerce. To do so please add the following line of code at the end of your theme’s functions.php file of your active child theme (or theme) and Save the file. add_filter (‘add_to_cart_redirect’, ‘redirect_to_cart’); function redirect_to_cart() { global $woocommerce; $cart_url = $woocommerce->cart->get_cart_url();

Scroll to Top