fix: WooPay & Stripe Link mutual compatibility in settings#11319
fix: WooPay & Stripe Link mutual compatibility in settings#11319
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
|
Size Change: +75 B (0%) Total Size: 950 kB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where WooPay and Stripe Link could both be enabled simultaneously through a specific sequence of actions in the settings. The fix ensures mutual exclusivity between WooPay and Stripe Link in the WooPay customization page.
Changes:
- Added Stripe Link enablement check in WooPay settings page
- Disabled WooPay toggle and displayed warning when Stripe Link is enabled
- Prioritized Stripe Link warning over incompatibility notice when both conditions exist
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
client/settings/express-checkout-settings/woopay-settings.js |
Added logic to detect Stripe Link enablement, disable WooPay checkbox, and display warning when Stripe Link is enabled |
client/settings/express-checkout-settings/__tests__/woopay-settings.test.js |
Added comprehensive tests for the new Stripe Link/WooPay mutual exclusivity behavior |
client/settings/express-checkout-settings/__tests__/index.test.js |
Added mock for useEnabledPaymentMethodIds hook to prevent test failures |
changelog/fix-woopay-link-compatibility-double-enablement |
Added changelog entry documenting this bug fix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dmvrtx
left a comment
There was a problem hiding this comment.
Thank you for noticing this! Works as expected. Code is clear and well covered with tests.
Fixes WOOPMNT-5701
Changes proposed in this Pull Request
Trying to avoid this scenario:

I noticed that it's technically possible to enable both WooPay and Stripe Link at the same time by:
I didn't write a migration to enforce - this scenario shouldn't have been possible in the first place. So I don't think it would affect too many people.
Testing instructions
npm run changelogto add a changelog file, choosepatchto leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge