Ensure add-to-cart is not present when redirecting after a deletion.
Fixes #5645
This commit is contained in:
parent
dd61317395
commit
1b41eef5f6
|
@ -383,7 +383,7 @@ class WC_Form_Handler {
|
|||
|
||||
wc_add_notice( __( 'Cart updated.', 'woocommerce' ) );
|
||||
|
||||
$referer = wp_get_referer() ? wp_get_referer() : WC()->cart->get_cart_url();
|
||||
$referer = wp_get_referer() ? remove_query_arg( 'add-to-cart', wp_get_referer() ) : WC()->cart->get_cart_url();
|
||||
wp_safe_redirect( $referer );
|
||||
exit;
|
||||
|
||||
|
|
Loading…
Reference in New Issue