Skip to content

Commit

Permalink
'connect_url_redirect' hook: Redirect to the 'redirect_after_auth' ur…
Browse files Browse the repository at this point in the history
…l if already connected (for 'connect_after_checkout' flow) (#39573)
  • Loading branch information
elliottprogrammer authored Sep 30, 2024
1 parent 1fe8e76 commit 69d30d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

In 'connect_url_redirect' hook, redirect to 'redirect_after_auth` url if already connected (for connect_after_checkout flow).
4 changes: 4 additions & 0 deletions projects/packages/connection/src/class-webhooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ public function handle_connect_url_redirect() {
wp_safe_redirect( $redirect );
$this->do_exit();
} else {
if ( 'connect-after-checkout' === $from && $redirect ) {
wp_safe_redirect( $redirect );
$this->do_exit();
}
$connect_url = add_query_arg(
array(
'from' => $from,
Expand Down

0 comments on commit 69d30d9

Please sign in to comment.