Marketplace connection deny redirect (#41398)

* Redirect connect deny to correct subscriptions page

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
berislav grgičak 2023-11-15 11:30:12 +01:00 committed by GitHub
parent 2a1e4a8874
commit 495475db13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Comment: Fix marketplace connection deny redirects.

View File

@ -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&section=helper' ) );
wp_safe_redirect(
self::get_helper_redirect_url(
array(
'page' => 'wc-addons',
'section' => 'helper',
),
isset( $_GET['redirect-to-wc-admin'] )
)
);
die();
}