From dd99c7fb17b41b9f61457e10d970a0ae5068b3ff Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 18 Apr 2016 11:48:57 +0100 Subject: [PATCH] Redirect to product screen if referer is missing. Fixes #10713 --- includes/class-wc-ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 779a7df8430..e0f0fb0d782 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -511,7 +511,7 @@ class WC_AJAX { } } - wp_safe_redirect( wp_get_referer() ? remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'ids' ), wp_get_referer() ) : admin_url( 'edit.php?post_type=shop_order' ) ); + wp_safe_redirect( wp_get_referer() ? remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'ids' ), wp_get_referer() ) : admin_url( 'edit.php?post_type=product' ) ); die(); }