WooCommerce: Redirect to an item’s product page after item is removed from cart

Question

On my cart page, I’d like to add a button that allows customers to remove an item from the cart, and after the items is removed, the customer is redirected to the product page for the item that was just removed.

So for example, a customer has Product A in the cart. While on the cart page, there is the regular “Remove from cart” button, that will remove the item from the cart and then reload the cart page. I’d like to have an additional button that would remove the item and then redirect you to the single product page for Product A.

Just to be clear, I know how to add a button to the WooCommerce cart page. But I don’t know what code is necessary to have the redirect happen.

The reason for this is that the customer can enter information on the product page, and if they made a mistake, I want them to be able to remove the item, go back to the product page, and start over.

0
glass duo 3 weeks 2023-01-18T20:42:13-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse