Merge pull request #6320 from ryanstockau/master
Fix infinite redirect loop on cart page
This commit is contained in:
commit
1fb8582acf
|
@ -383,7 +383,7 @@ class WC_Form_Handler {
|
|||
|
||||
wc_add_notice( __( 'Cart updated.', 'woocommerce' ) );
|
||||
|
||||
$referer = wp_get_referer() ? remove_query_arg( 'add-to-cart', wp_get_referer() ) : WC()->cart->get_cart_url();
|
||||
$referer = wp_get_referer() ? remove_query_arg( array( 'add-to-cart', 'remove_item' ), wp_get_referer() ) : WC()->cart->get_cart_url();
|
||||
wp_safe_redirect( $referer );
|
||||
exit;
|
||||
|
||||
|
|
Loading…
Reference in New Issue