Skip to content

PayPal Payment Buttons: Collect the shipping address without a shipping fee - #53500

Merged
tx2pnw merged 5 commits into
trunkfrom
fix/wooptp-590-decouple-shipping-address
Oct 14, 2026
Merged

tx2pnw merged 5 commits into
trunkfrom
fix/wooptp-590-decouple-shipping-address

Conversation

@tx2pnw

@tx2pnw tx2pnw commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes WOOPTP-590

Proposed changes

Let a PayPal button collect a shipping address without charging a shipping fee.

  • The "Shipping address" toggle, with the help "Collect during checkout", now sits above "Shipping fees" and shows whether or not "Shipping fees" is on.
  • Turning "Shipping fees" off clears the fees but keeps the address setting.
  • Tax or shipping set to "from my PayPal settings" with the address off shows "You need to be able to collect customer shipping address first." under that select, and the save is held back.
  • The "Shipping address" toggle is never locked, and picking PayPal-settings tax no longer turns it on.
  • Screen readers hear the error with the selected option.
  • The "Add shipping" toggle is now "Shipping fees", with the help "Set the shipping fee, including free shipping".

Why are these changes being made?

PayPal sets the address and the shipping fees separately, but the block only showed the address option with shipping on. PayPal also rejects tax or shipping from PayPal settings without the address.

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

No.

Testing instructions

Use a site with Jetpack connected and the paypal-payments-api-managed-buttons flag on. Build and load this branch: jp build packages/paypal-payments.

Add a PayPal Payment Buttons block with a payment link and open Checkout Options in the sidebar. Save the post after each step and check the link's details on the PayPal Payment Links admin page:

  1. "Shipping fees" off, turn on "Shipping address": Collect Shipping Address is Yes, and there's no Shipping row.
  2. "Shipping fees" on with a fee, turn off "Shipping address": the Shipping row shows the fee, and Collect Shipping Address is No.
  3. "Shipping fees" on with a fee and "Shipping address" on, then turn "Shipping fees" off: no Shipping row, and Collect Shipping Address is still Yes.
  4. "Shipping fees" and "Shipping address" off, turn on "Add tax" and pick "Use tax from my PayPal settings": the error shows under Tax type, "Shipping address" stays off and editable, and the save is held back. Turn on "Shipping address": the error clears and it saves.
  5. "Add tax" and "Shipping address" off, turn on "Shipping fees" with "Use shipping from my PayPal settings": the error shows under Shipping fee and the save is held back. Turn on "Shipping address": it saves.
  6. "Shipping address" off and "Shipping fees" on, save once with each Shipping fee option. "Use specific shipping fee", "Use quantity-based shipping fee" and "Free shipping" save with Collect Shipping Address No. "Use shipping from my PayPal settings" shows the error and the save is held back. Switching from a fee to "Free shipping" clears the fee: the Shipping row shows PREFERENCE: FREE_SHIPPING.
  7. Publish the post, view it, click the button, then "Debit or Credit Card" on PayPal's checkout. With a fee and "Shipping address" on, the order summary shows the Shipping line and the form asks for a shipping address. With "Shipping address" off, there's no shipping address section.

@tx2pnw tx2pnw self-assigned this Oct 12, 2026
@github-actions

github-actions Bot commented Oct 12, 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-590-decouple-shipping-address branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/wooptp-590-decouple-shipping-address

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 commented Oct 12, 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:

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.


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.

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Oct 12, 2026
@jp-launch-control

jp-launch-control Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 2 files.

File Coverage Δ% Δ Uncovered
projects/packages/paypal-payments/src/paypal-payment-buttons/edit-api-managed.jsx 267/267 (100.00%) 0.00% 0 💚
projects/packages/paypal-payments/src/paypal-payment-buttons/utils/validation.js 87/87 (100.00%) 0.00% 0 💚

Full summary · PHP report · JS report

@tx2pnw
tx2pnw force-pushed the fix/wooptp-590-decouple-shipping-address branch from 08eaf35 to ae3f071 Compare October 12, 2026 23:13
@tx2pnw
tx2pnw marked this pull request as ready for review October 13, 2026 00:19
@tx2pnw
tx2pnw force-pushed the fix/wooptp-590-decouple-shipping-address branch from ae3f071 to d525c78 Compare October 13, 2026 19:22
@tx2pnw
tx2pnw added this pull request to stack #53578 October 13, 2026 23:52
@tx2pnw
tx2pnw merged commit bc848f8 into trunk Oct 14, 2026
85 checks passed
@tx2pnw
tx2pnw deleted the fix/wooptp-590-decouple-shipping-address branch October 14, 2026 00:13
@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 Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress labels Oct 14, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant