Adding Products to Cart via Link

filterframe

Registered Member
Joined
Apr 16, 2019
Messages
82
Reaction score
84
EDIT: THIS IS FOR WOOCOMMERCE

How do I do this without keeping the arguments once redirected.

Example

site.com/checkout/?add-to-cart=id

This link takes the customer to the checkout screen as desired but "/?add-to-cart=id" remains in the url. How do I get this out of here so that the customer can not accidentally ad more products to the cart by refreshing?
 
This seems to fix the issue:

wordpress.org/support/topic/add-to-cart-duplicates-products-on-refresh/

You have to add it to your functions.php.
 
Back
Top