Limit shipping countries to US-only (5956)#4312
Merged
stracker-phil merged 9 commits intoApr 30, 2026
Merged
Conversation
Need it for post-code validation next
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 0a224e7 • Last updated: 2026-04-29T10:36:31.956Z |
stracker-phil
marked this pull request as ready for review
April 29, 2026 10:30
stracker-phil
requested review from
AlexP11223,
Dinamiko,
Narek13,
danieldudzic,
hmouhtar and
mmaymo
as code owners
April 29, 2026 10:30
danieldudzic
approved these changes
Apr 30, 2026
stracker-phil
force-pushed
the
dev/PCP-5956-validate-shipping-to-us
branch
from
April 30, 2026 12:14
1ef3693 to
11eb443
Compare
stracker-phil
merged commit Apr 30, 2026
b6d96d6
into
dev/PCP-4891-agentic-commerce
9 of 10 checks passed
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.
Description
In the first phase, the agentic commerce integration only allows shipping to US customers.
This limitation should be hard-coded at plugin level for extra safety. Later, the country list is extended gradually. Here we ensure that carts with a non-US shipping address trigger a ValidationIssue, regardless of the WooCommerce shipping settings.
Note: There is no indicator, whether the country was rejected by WooCommerce' settings, or by the hardcoded PayPal platform restriction. From a customer perspective, all that matters is, if the country is available or not.
Postman verification