Skip to content

Conversation

@woocommercebot
Copy link
Collaborator

This PR is a cherry-pick of #61678 to release/10.3.

⚠️ WARNING: This cherry-pick contained conflicts that have not been resolved. Please review the changes carefully before merging!

Original PR Description

Submission Review Guidelines:

Changes proposed in this Pull Request:

Towards PAYPAL-106

In this PR, I am using the league/iso3166 composer package to retrieve the two-letter country code from a three-letter code before attempting to create a PayPal Standard order. This should address some possible issues when the two-letter code would not match the three-letter version, just by truncating the string value (e.g., Uruguay (URY, UY).

Additional fixes:

  • Changes the comparison for the locale code to avoid setting the first two parts unnecessarily (d0cdb09)
  • Uses the existing country code length constant when handling it (a22c141)
  • Logging the three-letter country code (44926e7)
  • Moves the country code logic to a new private method (8b244b8)

How to test the changes in this Pull Request:

Code review. If you want to test this flow, you can follow #61034 to see if no regression was introduced.

Testing that has already taken place:

Changelog entry

  • Automatically create a changelog entry from the details below.
  • This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Attempts to identify the PayPal two-letter country code from a three-letter code using the league/iso3166 composer package, and applies minor additional fixes

Changelog Entry Comment

Comment

@woocommercebot woocommercebot requested a review from a team as a code owner October 31, 2025 15:27
@woocommercebot woocommercebot requested review from ObliviousHarmony and removed request for a team October 31, 2025 15:27
@github-actions github-actions bot added focus: monorepo infrastructure Issues and PRs related to monorepo tooling. plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Oct 31, 2025
@github-actions github-actions bot added this to the 10.3.0 milestone Oct 31, 2025
@github-actions
Copy link
Contributor

Testing Guidelines

Hi @ObliviousHarmony ,

Apart from reviewing the code changes, please make sure to review the testing instructions (Guide) and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed.

Reminder: PR reviewers are required to document testing performed. This includes:

  • 🖼️ Screenshots or screen recordings.
  • 📝 List of functionality tested / steps followed.
  • 🌐 Site details (environment attributes such as hosting type, plugins, theme, store size, store age, and relevant settings).
  • 🔍 Any analysis performed, such as assessing potential impacts on environment attributes and other plugins, conducting performance profiling, or using LLM/AI-based analysis.

⚠️ Within the testing details you provide, please ensure that no sensitive information (such as API keys, passwords, user data, etc.) is included in this public issue.

@github-actions
Copy link
Contributor

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Test this pull request with WordPress Playground.

Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit.

@jorgeatorres jorgeatorres merged commit 07c361e into release/10.3 Oct 31, 2025
1 check passed
@jorgeatorres jorgeatorres deleted the cherry-pick-PR61678-to-release/10.3 branch October 31, 2025 15:37
@github-actions github-actions bot added the metric: feature freeze exception A tracking label for PRs that were merged after the feature freeze. label Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

focus: monorepo infrastructure Issues and PRs related to monorepo tooling. metric: feature freeze exception A tracking label for PRs that were merged after the feature freeze. plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants