Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix prb not loading in legacy checkout experience #3703

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

Mayisha
Copy link
Contributor

@Mayisha Mayisha commented Jan 10, 2025

Fixes #3645

Changes proposed in this Pull Request:

In the constructor of includes/payment-methods/class-wc-stripe-payment-request.php we are bailing early if ECE feature flag is enabled (which is now enabled by default for everyone). But ECE is available for new checkout experience only. Due to this early bailing, neither ECE nor PRB are being registered when the legacy checkout experience is enabled.

Now we are bailing early from PRB only if ECE and the new checkout experience both are enabled.

Testing instructions

New checkout experience.

  • Enable the ECE feature flag. Confirm that on the checkout page, the ECE buttons are loaded and checkout with ECE is successful.
  • Disable the ECE feature flag. Confirm that on the checkout page, the PRB buttons are loaded and checkout with PRB is successful.

Legacy checkout experience.

  • Enable the ECE feature flag (because it is enabled by default now). Confirm that on the checkout page, the PRB buttons are loaded and checkout with PRB is successful.

@Mayisha Mayisha requested a review from wjrosa January 10, 2025 11:52
Copy link
Contributor

@wjrosa wjrosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix! Works as expected:

New checkout experience.

  • Enable the ECE feature flag. Confirm that on the checkout page, the ECE buttons are loaded and checkout with ECE is successful.

Screenshot 2025-01-10 at 10 50 45
Screenshot 2025-01-10 at 10 51 37

  • Disable the ECE feature flag. Confirm that on the checkout page, the PRB buttons are loaded and checkout with PRB is successful.

Screenshot 2025-01-10 at 10 52 57
Screenshot 2025-01-10 at 10 53 30

Legacy checkout experience.

  • Enable the ECE feature flag (because it is enabled by default now). Confirm that on the checkout page, the PRB buttons are loaded and checkout with PRB is successful.

Screenshot 2025-01-10 at 10 22 24
Screenshot 2025-01-10 at 10 23 22

@Mayisha Mayisha force-pushed the fix/3645-prb-in-legacy branch from 8273591 to c5799c4 Compare January 10, 2025 16:19
@Mayisha Mayisha changed the base branch from develop to release/9.1.1 January 10, 2025 16:19
@Mayisha Mayisha merged commit 1533f16 into release/9.1.1 Jan 10, 2025
@Mayisha Mayisha deleted the fix/3645-prb-in-legacy branch January 10, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants