diff --git a/plugins/woocommerce/changelog/41398-fix-connect-deny-redirect b/plugins/woocommerce/changelog/41398-fix-connect-deny-redirect new file mode 100644 index 00000000000..cb2a7d4b006 --- /dev/null +++ b/plugins/woocommerce/changelog/41398-fix-connect-deny-redirect @@ -0,0 +1,4 @@ +Significance: patch +Type: fix +Comment: Fix marketplace connection deny redirects. + diff --git a/plugins/woocommerce/includes/admin/helper/class-wc-helper.php b/plugins/woocommerce/includes/admin/helper/class-wc-helper.php index 7098929c95e..1d46774e267 100644 --- a/plugins/woocommerce/includes/admin/helper/class-wc-helper.php +++ b/plugins/woocommerce/includes/admin/helper/class-wc-helper.php @@ -788,7 +788,16 @@ class WC_Helper { * Fires when the Helper connection process is denied/cancelled. */ do_action( 'woocommerce_helper_denied' ); - wp_safe_redirect( admin_url( 'admin.php?page=wc-addons§ion=helper' ) ); + + wp_safe_redirect( + self::get_helper_redirect_url( + array( + 'page' => 'wc-addons', + 'section' => 'helper', + ), + isset( $_GET['redirect-to-wc-admin'] ) + ) + ); die(); }