Unsuccessfully sandbox onboarding via wizard (6714)#4555
Merged
Conversation
Dinamiko
requested review from
AlexP11223,
Narek13,
danieldudzic,
mmaymo and
stracker-phil
as code owners
July 24, 2026 10:17
Test using WordPress PlaygroundThe changes in this pull request can be previewed and tested using a WordPress Playground instance. 🔗 Test this pull request with WordPress Playground What's included:
Login credentials:
Plugin Details:
🤖 Auto-generated for commit 7c8a74c • Last updated: 2026-07-24T14:09:36.832Z |
…nds to the minibrowser
stracker-phil
approved these changes
Jul 24, 2026
stracker-phil
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, and local test also shows it solves the problem
stracker-phil
deleted the
dev/PCP-6714-unsuccessfully-sandbox-onboarding-via-wizard-connecting-under-button-for-live-account
branch
July 24, 2026 17:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enabling Sandbox Mode and clicking "Connect Account" opened PayPal onboarding in a new tab instead of minibrowser, and never connected. PayPal's
partner.jsuses a single global, takes its environment from its own script domain, and only wires the first[data-paypal-button]. The plugin always loaded the production SDK with both buttons present (live first), so only the live button got bound; the sandbox button stayed a plain link.PR changes
useHandleConnections.js: load the environment-specific partner.js (production/sandbox) only for the button matching the Sandbox toggle, resettingwindow.PAYPALon switch.ConnectionButton.js: only the active-environment button is a real[data-paypal-button](so PayPal binds it); added a click-guard that blocks clicks until the button is actually bound.