From 4998f88dc5353868e08e457b03c807a14d0a99a6 Mon Sep 17 00:00:00 2001 From: Ryan Stock Date: Fri, 19 Sep 2014 13:24:31 +1000 Subject: [PATCH] Fix infinite redirect loop on cart page Fix for issue #6319: https://github.com/woothemes/woocommerce/issues/6319 --- includes/class-wc-form-handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-form-handler.php b/includes/class-wc-form-handler.php index b6a98d3ebab..33290fad173 100644 --- a/includes/class-wc-form-handler.php +++ b/includes/class-wc-form-handler.php @@ -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;