Skip to content

Commit

Permalink
Hide express payment buttons on switch subscription page (#3610)
Browse files Browse the repository at this point in the history
* hide express checkout buttons on switch subscription page

* add changelog

* fix return statement
  • Loading branch information
Mayisha authored Nov 20, 2024
1 parent 3e56eca commit 5040f12
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Tweak - Standardize ECE Express payment buttons on Pay for Order page to match cart and checkout itemization behavior.
* Tweak - Remove duplicate notice about the new checkout experience.
* Fix - Fix ECE modal not loading on pay for order page when coupon is applied.
* Fix - Do not load express payment buttons on switch subscription page.
* Fix - Return 'is_live' as true in account summary response when test mode is disabled in gateway settings and charge is enabled in Stripe account.

= 8.9.0 - 2024-11-14 =
Expand Down
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;
}

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;
}

$this->init();
}

Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
* Tweak - Standardize ECE Express payment buttons on Pay for Order page to match cart and checkout itemization behavior.
* Tweak - Remove duplicate notice about the new checkout experience.
* Fix - Fix ECE modal not loading on pay for order page when coupon is applied.
* Fix - Do not load express payment buttons on switch subscription page.
* Fix - Return 'is_live' as true in account summary response when test mode is disabled in gateway settings and charge is enabled in Stripe account.

[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).

0 comments on commit 5040f12

Please sign in to comment.