I’ve seen many tutorials dealing on how to customize woocommerce’s checkout page by adding or removing fields.
But what I want is to place a link or button on the Woocommerce Checkout page saying “Return to Cart” (obviously linking to the cart page) but I want it placed just after the “Your Order” section, (the section where you review your order). I want it there because I want it along with a text saying something like “If you want to change your order return to Cart“.
If I edit the actual checkout page and add the link there, it shows all the way to the bottom so maybe I have to add code to the theme’s functions file? Any guidance will be greatly appreciated.
Thank you.
EDIT:
Ok, I’ve found a very crappy way of doing it.
I just added this line to the review-order.php file located in woocommerce/templates/checkout/ , right after the shop_table class:
<?php echo "<strong>If you'd like to change your order, go back to <a href='http://www.mysite.com/cart/'>My Cart</a></strong><br />"; ?>
This does the trick, but everytime I update woocommerce I will have to added it again.
Any suggestion of a more practical and intelligent way of doing it?
Create a child theme.
Put this in the child theme’s functions.php
Well, if you created a child theme you could have put that line in your child’s functions.php and then the only way an update would affect it is if they changed the coding.