Skip to content

PayPal Payment Buttons: reject a return URL longer than PayPal accepts - #52556

Merged
millerf merged 1 commit into
add/wooptp-510-changes-made-dialogfrom
fix/wooptp-482-return-url-length
Sep 22, 2026
Merged

millerf merged 1 commit into
add/wooptp-510-changes-made-dialogfrom
fix/wooptp-482-return-url-length

Conversation

@millerf

@millerf millerf commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Fixes N/A

Stacked on #52553 (WOOPTP-510), itself on #52550, #52543 and #52534: the base is add/wooptp-510-changes-made-dialog, and this diff is the last commit only. Retarget to trunk once those merge.

Proposed changes

  • PayPal rejects a return URL over 127 characters, and the block passed any length through. The URL Redirect field in the block's form now says "Return URL must be 127 characters or fewer." under a longer one, on top of the existing HTTPS check.
  • The server-side attribute validation rejects the same case with a return_url_too_long error, so a longer URL never reaches PayPal whichever way the request arrives.
  • The form's return URL error stays advisory, as it has always been: it warns, and the post still saves. The save then fails on the server-side check with the same message in the snackbar, instead of failing at PayPal with a less specific one.

Related product discussion/links

Does this pull request change what data or activity we track or use?

No.

Testing instructions

The block is behind the paypal-payments-api-managed-buttons feature flag, and needs a site connected to a PayPal (sandbox) account.

  • Add or edit a PayPal Payment Button block, open the URL Redirect panel and paste an HTTPS URL longer than 127 characters, for example a post editor URL with its query string. Leave the field: it shows "Return URL must be 127 characters or fewer."
  • Shorten it to 127 characters or fewer: the error goes away.
  • Save the post with the long URL in place: the snackbar reports that PayPal did not save the button, with the same reason.
  • Run jp test js packages/paypal-payments and jp test php packages/paypal-payments.

🤖 Generated with Claude Code

@millerf millerf added [Status] Needs Review This PR is ready for review. [Type] Bug labels Sep 21, 2026
@millerf millerf self-assigned this Sep 21, 2026
@github-actions

github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the fix/wooptp-482-return-url-length branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/wooptp-482-return-url-length

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions Bot added [Package] Paypal Payments [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Paypal Payment Buttons [Tests] Includes Tests labels Sep 21, 2026
@github-actions

github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: October 6, 2026

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Paypal Payment buttons plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@millerf
millerf force-pushed the fix/wooptp-482-return-url-length branch from 5cbf652 to 2424481 Compare September 21, 2026 15:32
@millerf
millerf changed the base branch from trunk to add/wooptp-510-changes-made-dialog September 21, 2026 15:32
@millerf
millerf added this pull request to stack #52548 September 21, 2026 15:34
@jp-launch-control

jp-launch-control Bot commented Sep 21, 2026

Copy link
Copy Markdown

Code Coverage Summary

No summary data is available for parent commit d2a02de, so cannot calculate coverage changes. 😴

If that commit is a feature branch rather than a trunk commit, this is expected. Otherwise, this should be updated once coverage for d2a02de is available.

Full summary · PHP report · JS report

tx2pnw
tx2pnw previously approved these changes Sep 21, 2026

@tx2pnw tx2pnw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM and worked for me.

@millerf
millerf dismissed tx2pnw’s stale review September 22, 2026 09:05

The merge-base changed after approval.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@millerf
millerf force-pushed the fix/wooptp-482-return-url-length branch from 2424481 to 8d5a682 Compare September 22, 2026 09:55
@millerf
millerf merged commit a71bfdf into trunk Sep 22, 2026
78 of 79 checks passed
@millerf
millerf deleted the fix/wooptp-482-return-url-length branch September 22, 2026 11:15
@github-actions github-actions Bot added [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. and removed [Status] Needs Review This PR is ready for review. labels Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Paypal Payments [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Paypal Payment Buttons [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. [Tests] Includes Tests [Type] Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants