Skip to content

Commit

Permalink
hide express checkout buttons on switch subscription page
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayisha committed Nov 18, 2024
1 parent 15f958c commit 604cea0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ public function init() {
return;
}

// Don't load for switch subscription page.
if ( isset( $_GET['switch-subscription'] ) ) {
return true;
}

add_action( 'template_redirect', [ $this, 'set_session' ] );
add_action( 'template_redirect', [ $this, 'handle_express_checkout_redirect' ] );

Expand Down
5 changes: 5 additions & 0 deletions includes/payment-methods/class-wc-stripe-payment-request.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ public function __construct() {
return;
}

// Don't load for switch subscription page.
if ( isset( $_GET['switch-subscription'] ) ) {
return true;
}

$this->init();
}

Expand Down

0 comments on commit 604cea0

Please sign in to comment.