Skip to content

Add initial shipping providers support #58731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

tpaksu
Copy link
Contributor

@tpaksu tpaksu commented Jun 11, 2025

Submission Review Guidelines:

Changes proposed in this Pull Request:

Closes WOOPLUG-3999 #57404

Screenshots or screen recordings:

image

How to test the changes in this Pull Request:

  1. Checkout this branch
  2. Run composer dumpautoload just in case the autoloader doesn't catch the new files
  3. Rebuild the client assets with pnpm run watch:build in plugins/woocommerce folder

Testing the shipping providers

  1. Create a new order if you don't have one
  2. On the fulfillments screen, go to manual shipment provider entry form, and click the providers dropdown. It should now show the new providers outlined in https://docs.google.com/spreadsheets/d/1EGdA9QCEh-tLtH_6SYc0dm4wKiYcZ2VGufJ9mBmugl4/edit?usp=sharing
  3. Save the tracking information, and see if it displays correctly on the saved fulfillment box

Testing the fulfillment status strings

  1. Save a draft fulfillment, the badge should now show Unfulfilled instead of unfulfilled because it now gets the translated strings via wcFulfillmentSettings.statuses JS variable export.
  2. Fulfill the fulfillment, it should now show "Fulfilled" instead of "fulfilled".

Testing the currency symbols

  1. Change the store currency to another currency (possibly having a distinctable currency symbol, like that your payment provider supports, on WooCommerce > Settings > General tab
  2. Create an order with that currency
  3. See that the currency shows correctly on the fulfillment screen with the correct symbol

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

Changelog Entry Comment

Comment

Move the shipping providers list from frontend to backend, add additional providers

@tpaksu tpaksu marked this pull request as ready for review June 12, 2025 08:19
@tpaksu tpaksu requested review from a team, ayushpahwa and samnajian and removed request for a team and ayushpahwa June 12, 2025 08:19
Copy link
Contributor

github-actions bot commented Jun 12, 2025

Testing Guidelines

Hi @samnajian ,

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 github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Jun 12, 2025
Copy link
Contributor

github-actions bot commented Jun 12, 2025

Size Change: -5.42 kB (-0.09%)

Total Size: 5.9 MB

Filename Size Change
./plugins/woocommerce/client/admin/build/wp-admin-scripts/fulfillments.js 11.4 kB -5.42 kB (-32.3%) 🎉

compressed-size-action

Copy link
Contributor

github-actions bot commented Jun 12, 2025

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.

@samnajian samnajian requested review from samnajian and removed request for samnajian June 12, 2025 13:25
@tpaksu tpaksu self-assigned this Jun 12, 2025
@tpaksu tpaksu linked an issue Jun 12, 2025 that may be closed by this pull request
Copy link
Contributor

coderabbitai bot commented Jun 13, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@samnajian samnajian left a comment

Choose a reason for hiding this comment

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

Functionality is as expected, left some comments.

* Get initial shipping providers.
*
* This method returns an array of initial shipping providers that will be available
* in the fulfillment process. It allows for filtering to add or modify the list of
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess adding the name of those filter here to this doc block can be useful.

@tpaksu tpaksu requested a review from samnajian June 18, 2025 08:51
Copy link
Contributor

@samnajian samnajian left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the updates.

@tpaksu tpaksu merged commit b6a6773 into feature/57353-order-fulfillments-entity Jun 18, 2025
20 of 34 checks passed
@tpaksu tpaksu deleted the add/WOOPLUG-3999-order-fulfillments-add-shipping-providers-support branch June 18, 2025 20:03
kalessil added a commit that referenced this pull request Jul 21, 2025
* Add new database tables for fulfillments (#57428)

* Add new database tables for fulfillments

* Add changefile(s) from automation for the following project(s): woocommerce

* Update fulfillment tables to use CURRENT_TIMESTAMP for `date_updated`, which replaces `date_created`

* Add auto update to current timestamp

* Remove setting `date_updated` automatically, making it managed via code

* Add `status` and `is_fulfilled` columns to fulfillments table

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Vladimir Reznichenko <kalessil@gmail.com>

* Add order fulfillments data store (#57429)

* Add new database tables for fulfillments

* Add changefile(s) from automation for the following project(s): woocommerce

* Initial commit

* Add fulfillment object and its data store

* Add changefile(s) from automation for the following project(s): woocommerce

* Move fulfillment related code to src folder

* Remove leftover code changes

* Fix unit test and linter error

* Update fulfillment tables to use CURRENT_TIMESTAMP for `date_updated`, which replaces `date_created`

* Add auto update to current timestamp

* Get datastore via dependency injection, rename date_created to date_updated

* Remove setting `date_updated` automatically, making it managed via code

* Convert errors to exceptions

* Add data and return types to class methods

* Add `status` and `is_fulfilled` columns to fulfillments table

* Refactor Fulfillment class to use data array for properties and update database insertion logic

* Add `read_fulfillments` method, add new column getters/setters, fix tests

* Set defaults, change reset approach

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Vladimir Reznichenko <kalessil@gmail.com>

* Add order fulfillments REST API endpoints (#57496)

* Add new database tables for fulfillments

* Add changefile(s) from automation for the following project(s): woocommerce

* Initial commit

* Add fulfillment object and its data store

* Add changefile(s) from automation for the following project(s): woocommerce

* Move fulfillment related code to src folder

* Remove leftover code changes

* Fix unit test and linter error

* Update fulfillment tables to use CURRENT_TIMESTAMP for `date_updated`, which replaces `date_created`

* Add auto update to current timestamp

* Get datastore via dependency injection, rename date_created to date_updated

* Remove setting `date_updated` automatically, making it managed via code

* Convert errors to exceptions

* Add data and return types to class methods

* Initial commit

* Create the base REST controller file

* Register the REST controller on container, add service provider

* Rename ServiceProvider, omit RestController from the name

* Add strict types declaration

* Add base of the REST methods

* Add `status` and `is_fulfilled` columns to fulfillments table

* Refactor Fulfillment class to use data array for properties and update database insertion logic

* Add `read_fulfillments` method, add new column getters/setters, fix tests

* Set defaults, change reset approach

* Complete fulfillments REST controller code

* Start adding tests

* Fix helper namespace, add strict types check to helper file

* Add more tests

* Finish tests

* Remove meta id assertions from meta data  tests

* Remove date_deleted field from test

* Replace using body params with JSON params, fix tests

* Implement not applying actions on deleted records

* Allow arrays to be saved as meta by saving all meta as JSON encoded to the DB

* Reduce duplicated code, improve array validation

* Throw exception instead of returning an error on fulfillment validation

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Vladimir Reznichenko <kalessil@gmail.com>

* Add base user interface for order fulfillments (#57732)

* Initial commit

* Add fulfillments drawer renderer and component

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Fix comments and method naming

* Add tests

* Add check for null screen

* Test returning internal meta keyse to fix unit test error on Github

* Fix non-static method called as static method

* Remove fix attempt as it didn't work

* Fix test error caused by container mock

* Address multiple issues

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add fulfillment editor form on base user interface (#57758)

* Initial commit

* Add fulfillments drawer renderer and component

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Fix comments and method naming

* Add tests

* Add check for null screen

* Test returning internal meta keyse to fix unit test error on Github

* Fix non-static method called as static method

* Remove fix attempt as it didn't work

* Fix test error caused by container mock

* Initial commit

* Add item listing and shipment information blocks

* Add checkbox selection details

* Fix bulk checkbox, add select all link

* Finish shipment information form

* Add notification box and buttons

* Add ShipmentFormContext, restructure components

* Refactor code, create fulfillments list

* Add fulfillment editor

* Fix items reverting after click, fix radio group on shipping options, keep order items visible when a fulfillment details are open

* Address multiple issues

* Add update, delete actions, shipping form manual edit names, componentize recurring code

* Add JS tests

* Fix issues with icons and images, add max-width to drawer

* Split PR into multiple PR's that solve only the focused issue

* Add disabled state when editing a fulfillment

* Disable other fulfillments when editing, add disabled states to buttons, fix test, fix fulfillment UI update after edit

* Add collapse to pending items, css styling

* Fix test

* Set order items open when no fulfillments are available

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Styling fixes, item price fixes

* Fix item selection

* Show new fulfillment form items as checked initially

* Skip disabling header on edit, exit edit mode on drawer close

* Small fixes

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add shipment information box on fulfillment editor (#57989)

* Initial commit

* Add fulfillments drawer renderer and component

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Fix comments and method naming

* Add tests

* Add check for null screen

* Test returning internal meta keyse to fix unit test error on Github

* Fix non-static method called as static method

* Remove fix attempt as it didn't work

* Fix test error caused by container mock

* Initial commit

* Add item listing and shipment information blocks

* Add checkbox selection details

* Fix bulk checkbox, add select all link

* Finish shipment information form

* Add notification box and buttons

* Add ShipmentFormContext, restructure components

* Refactor code, create fulfillments list

* Add fulfillment editor

* Fix items reverting after click, fix radio group on shipping options, keep order items visible when a fulfillment details are open

* Address multiple issues

* Add update, delete actions, shipping form manual edit names, componentize recurring code

* Add JS tests

* Fix issues with icons and images, add max-width to drawer

* Split PR into multiple PR's that solve only the focused issue

* Add disabled state when editing a fulfillment

* Disable other fulfillments when editing, add disabled states to buttons, fix test, fix fulfillment UI update after edit

* Add collapse to pending items, css styling

* Fix test

* Set order items open when no fulfillments are available

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Add shipment information box and tests

* Fix fulfillment shipping settings not updating as expected, add constants for meta keys, disable changing values on lookup form, fix tests

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Styling fixes, item price fixes

* Fix item selection

* Replace H4's with component labels, apply design to tracking number lookup result,  add useMemo to context values

* Show new fulfillment form items as checked initially

* Change icon color, undisable header, disable edit mode before closing drawer

* Skip disabling header on edit, exit edit mode on drawer close

* Small fixes

* Increase meta list font size

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add the fulfillment metadata display box (#58010)

* Initial commit

* Add fulfillments drawer renderer and component

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Fix comments and method naming

* Add tests

* Add check for null screen

* Test returning internal meta keyse to fix unit test error on Github

* Fix non-static method called as static method

* Remove fix attempt as it didn't work

* Fix test error caused by container mock

* Initial commit

* Add item listing and shipment information blocks

* Add checkbox selection details

* Fix bulk checkbox, add select all link

* Finish shipment information form

* Add notification box and buttons

* Add ShipmentFormContext, restructure components

* Refactor code, create fulfillments list

* Add fulfillment editor

* Fix items reverting after click, fix radio group on shipping options, keep order items visible when a fulfillment details are open

* Address multiple issues

* Add update, delete actions, shipping form manual edit names, componentize recurring code

* Add JS tests

* Fix issues with icons and images, add max-width to drawer

* Split PR into multiple PR's that solve only the focused issue

* Add disabled state when editing a fulfillment

* Disable other fulfillments when editing, add disabled states to buttons, fix test, fix fulfillment UI update after edit

* Add collapse to pending items, css styling

* Fix test

* Set order items open when no fulfillments are available

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Add shipment information box and tests

* Fix fulfillment shipping settings not updating as expected, add constants for meta keys, disable changing values on lookup form, fix tests

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Add the fulfillment metadata display box

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Styling fixes, item price fixes

* Fix item selection

* Replace H4's with component labels, apply design to tracking number lookup result,  add useMemo to context values

* Show new fulfillment form items as checked initially

* Change icon color, undisable header, disable edit mode before closing drawer

* Skip disabling header on edit, exit edit mode on drawer close

* Small fixes

* Increase meta list font size

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add customer notification box to fulfillment editor form (#58551)

* Initial commit

* Add fulfillments drawer renderer and component

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Fix comments and method naming

* Add tests

* Add check for null screen

* Test returning internal meta keyse to fix unit test error on Github

* Fix non-static method called as static method

* Remove fix attempt as it didn't work

* Fix test error caused by container mock

* Initial commit

* Add item listing and shipment information blocks

* Add checkbox selection details

* Fix bulk checkbox, add select all link

* Finish shipment information form

* Add notification box and buttons

* Add ShipmentFormContext, restructure components

* Refactor code, create fulfillments list

* Add fulfillment editor

* Fix items reverting after click, fix radio group on shipping options, keep order items visible when a fulfillment details are open

* Address multiple issues

* Add update, delete actions, shipping form manual edit names, componentize recurring code

* Add JS tests

* Fix issues with icons and images, add max-width to drawer

* Split PR into multiple PR's that solve only the focused issue

* Add disabled state when editing a fulfillment

* Disable other fulfillments when editing, add disabled states to buttons, fix test, fix fulfillment UI update after edit

* Add collapse to pending items, css styling

* Fix test

* Set order items open when no fulfillments are available

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Add shipment information box and tests

* Fix fulfillment shipping settings not updating as expected, add constants for meta keys, disable changing values on lookup form, fix tests

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Add the fulfillment metadata display box

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Add customer notification box, connect it to REST API endpoints

* Styling fixes, item price fixes

* Fix item selection

* Replace H4's with component labels, apply design to tracking number lookup result,  add useMemo to context values

* Show new fulfillment form items as checked initially

* Change icon color, undisable header, disable edit mode before closing drawer

* Skip disabling header on edit, exit edit mode on drawer close

* Fix indenting errors after merge commit

* Add remove fulfilled fulfillment confirmation modal

* Small fixes

* Increase meta list font size

* Fix tests

* Add confirmation test

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add order fulfillment notification emails (#58558)

* Initial commit

* Add fulfillments drawer renderer and component

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Fix comments and method naming

* Add tests

* Add check for null screen

* Test returning internal meta keyse to fix unit test error on Github

* Fix non-static method called as static method

* Remove fix attempt as it didn't work

* Fix test error caused by container mock

* Initial commit

* Add item listing and shipment information blocks

* Add checkbox selection details

* Fix bulk checkbox, add select all link

* Finish shipment information form

* Add notification box and buttons

* Add ShipmentFormContext, restructure components

* Refactor code, create fulfillments list

* Add fulfillment editor

* Fix items reverting after click, fix radio group on shipping options, keep order items visible when a fulfillment details are open

* Address multiple issues

* Add update, delete actions, shipping form manual edit names, componentize recurring code

* Add JS tests

* Fix issues with icons and images, add max-width to drawer

* Split PR into multiple PR's that solve only the focused issue

* Add disabled state when editing a fulfillment

* Disable other fulfillments when editing, add disabled states to buttons, fix test, fix fulfillment UI update after edit

* Add collapse to pending items, css styling

* Fix test

* Set order items open when no fulfillments are available

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Add shipment information box and tests

* Fix fulfillment shipping settings not updating as expected, add constants for meta keys, disable changing values on lookup form, fix tests

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Add the fulfillment metadata display box

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Add customer notification box, connect it to REST API endpoints

* Styling fixes, item price fixes

* Fix item selection

* Replace H4's with component labels, apply design to tracking number lookup result,  add useMemo to context values

* Show new fulfillment form items as checked initially

* Change icon color, undisable header, disable edit mode before closing drawer

* Skip disabling header on edit, exit edit mode on drawer close

* Fix indenting errors after merge commit

* Add remove fulfilled fulfillment confirmation modal

* Small fixes

* Increase meta list font size

* Fix tests

* Add confirmation test

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Initial push

* Add fulfillment created emails and bind to actions

* Add plaintext fulfillment emails

* Add tests, rename file

* Add changefile(s) from automation for the following project(s): woocommerce

* Fix code indentation error after merge

* Fix `woocommmerce` typo

* Fix comments and optimize code

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add fulfillments to customer order details page (#58713)

* Initial push

* Add customer order display modifications

* Fix error caused by null order

* Add changefile(s) from automation for the following project(s): woocommerce

* Add `_fulfilled_date` metadata automatically on fulfill

* Add date fulfilled getter/setter as a method of Fulfillment object

* Move fulfillment details into hook, fix file paths in comments

* Replace strong with mark on order status details text

* Replace &nbsp; with space

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add lock meta and it's handling (#58832)

* Add lock meta and it's handling

* Add JS tests

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Update design

* Update plugins/woocommerce/client/admin/client/wp-admin-scripts/fulfillments/components/user-interface/lock-label.tsx

Co-authored-by: Fernando Espinosa <Ferdev@users.noreply.github.com>

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Fernando Espinosa <Ferdev@users.noreply.github.com>

* Add bulk fulfillment actions (#58824)

* Initial push

* Add initial bulk actions code

* Handle fulfilling existing fulfillments of the order

* Add tests

* Add legacy CPT order type support

* Fix tests

* Add changefile(s) from automation for the following project(s): woocommerce

* Fix utility method

* Remove unfulfill action

* Ensure items are saved as arrays

* Fix test

* Fix formatting after merge

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add filter and action for fulfillment creation (#58793)

* Add filter and action for fulfillment creation

* Remove metadata viewer test code

* Fix JS tests

* Refine fulfillment error message delivery via hooks

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Fix comment

* Modify fulfill items button to show message

* Optimize JS code

* Optimize missed JS code

* Remove code that tries to recreate fulfillment after deletion

* Fix alignment

* Apply patch to remove React checkbox component  warnings

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add initial shipping providers support (#58731)

* Initial push

* Add initial shipping providers support

* Fix tests

* Add strict types declaration

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Add tests

* Fix test related to emails PR, unrelated with this one

* Improve comment, fix printing prices for orders without currency

* Use wp_localize_script instead of echo

* Revert wp_localize_script mods

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add filter and action for fulfillment update (#58810)

* Add filter and action for fulfillment creation

* Remove metadata viewer test code

* Fix JS tests

* Refine fulfillment error message delivery via hooks

* Initial push

* Add filter and action for fulfillment update

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Add changefile(s) from automation for the following project(s): woocommerce

* Add changefile(s) from automation for the following project(s): woocommerce

* Fix comment

* Modify fulfill items button to show message

* Modify update button to show error

* Optimize JS code

* Optimize JS code

* Optimize missed JS code

* Remove code that tries to recreate fulfillment after deletion

* Fix alignment

* Fix circular execution of hook

* Remove debug code

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add filter and action for fulfillment delete (#58812)

* Add filter and action for fulfillment creation

* Remove metadata viewer test code

* Fix JS tests

* Refine fulfillment error message delivery via hooks

* Initial push

* Add filter and action for fulfillment update

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Add changefile(s) from automation for the following project(s): woocommerce

* Add filter and action for fulfillment delete

* Add changefile(s) from automation for the following project(s): woocommerce

* Add changefile(s) from automation for the following project(s): woocommerce

* Fix comment

* Modify fulfill items button to show message

* Modify update button to show error

* Modify remove button to show error

* Optimize JS code

* Optimize JS code

* Optimize JS code

* Optimize missed JS code

* Remove code that tries to recreate fulfillment after deletion

* Fix alignment

* Fix circular execution of hook

* Add check for action to prevent recursion

* Remove debug code

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add filter and action for fulfillment fulfilling (#58823)

* Add filter and action for fulfillment creation

* Remove metadata viewer test code

* Fix JS tests

* Refine fulfillment error message delivery via hooks

* Initial push

* Add filter and action for fulfillment update

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Add changefile(s) from automation for the following project(s): woocommerce

* Add filter and action for fulfillment delete

* Add changefile(s) from automation for the following project(s): woocommerce

* Add changefile(s) from automation for the following project(s): woocommerce

* Fix comment

* Add filter and action for fulfillment fulfilling

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Modify fulfill items button to show message

* Modify update button to show error

* Modify remove button to show error

* Update fulfill-items-button.tsx

* Optimize JS code

* Optimize JS code

* Optimize JS code

* Optimize missed JS code

* Remove code that tries to recreate fulfillment after deletion

* Fix alignment

* Fix circular execution of hook

* Add check for action to prevent recursion

* Add constraints for hooks, and param docblocks

* Remove debug code

---------

Co-authored-by: github-actions <github-actions@github.com>

* Fix fulfillment object rendering (#58978)

* Fix fulfillment object rendering

* Add changefile(s) from automation for the following project(s): woocommerce

* Fix tests

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add fulfillments drawer to order details (#58859)

* Add filter by fulfillment status select to the orders list (#58865)

* Add the select to the orders list

* Add filter query

* Fix lint error

* Fix linter error

* Save order fulfillment statuses as order meta on each update

* Fix tests and bugs found from tests

* Make filters work both in legacy orders table and HPOS order table

* Remove initial order fulfillment status setting, and adjust filters

* Remove fulfillment status saving on table render

* Fix tests

* Add tests

* Add changefile(s) from automation for the following project(s): woocommerce

* Fix merge conflicts and tests

* Fix select displaying labels properly

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add auto-fulfillment settings for virtual and downloadable items (#59085)

* Fix class autoloader, and add settings page mods

* Fix email rendering issues

* Add changefile(s) from automation for the following project(s): woocommerce

* Use order object instead of order_id and `wc_get_order` call

* Make the order check a bit more secure

* Change hooks used for auto-fulfillment covering all scenarios

* Defer settings modification to init to make product settings tests pass

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add `wc_fulfillment_statuses` filter, and utility to get status properties (#58963)

* Add the select to the orders list

* Add filter query

* Add filter and util

* Fix recursion by converting main filter to a getter

* Fix lint error

* Fix lint error

* Fix linter error

* Save order fulfillment statuses as order meta on each update

* Fix tests and bugs found from tests

* Make filters work both in legacy orders table and HPOS order table

* Remove initial order fulfillment status setting, and adjust filters

* Remove fulfillment status saving on table render

* Fix tests

* Add tests

* Add changefile(s) from automation for the following project(s): woocommerce

* Revert changes

* Add custom status support and rendering props

* Fix tests and merge conflicts

* Fix linter error after merge

* Allow plugins to modify order fulfillment status

* Add tests for fulfillment status filters

* Fix namespace

* Fix client scripts to display fulfillment statuses correctly

* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin

* Make is_fulfilled field private, and computed from status field, fix tests

* Remove private set_is_fulfilled call

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add filter for individual item auto-fulfillment (#59101)

* Add shipping provider PNG image logos and replace base64 encoded images (#59205)

* Add shipping provider PNG image logos and replace base64 encoded images

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>

* Convert shipping provider configuration arrays into shipping provider classes (#59214)

* Add shipping provider PNG image logos and replace base64 encoded images

* Add changefile(s) from automation for the following project(s): woocommerce

* Convert shipping provider configuration arrays into shipping provider classes, adapt UI and JS variable export to changes

* Add tests

* Fix namespace

* Fix class name case

* Fix another classname case issue

* Fix shipping provider class initialization with DI

* Fix tracking number parse response handling

* Fix test

* Add all matches to parsing results, normalize tracking number

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add tracking number parsing support for UPS shipping provider (#59222)

* Add shipping provider PNG image logos and replace base64 encoded images

* Add changefile(s) from automation for the following project(s): woocommerce

* Convert shipping provider configuration arrays into shipping provider classes, adapt UI and JS variable export to changes

* Add tests

* Fix namespace

* Fix class name case

* Fix another classname case issue

* Add tracking number parsing support for UPS shipping provider

* Fix shipping provider class initialization with DI

* Fix tracking number parse response handling

* Fix test

* Fix namespace of test file

* Add ambiguity scoring

* Shipping provider and test changes

* Elaborate Surepost format

* Add all matches to parsing results, normalize tracking number

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add tracking number parsing support for USPS shipping provider (#59229)

* Add shipping provider PNG image logos and replace base64 encoded images

* Add changefile(s) from automation for the following project(s): woocommerce

* Convert shipping provider configuration arrays into shipping provider classes, adapt UI and JS variable export to changes

* Add tests

* Fix namespace

* Fix class name case

* Fix another classname case issue

* Add tracking number parsing support for UPS shipping provider

* Fix shipping provider class initialization with DI

* Fix tracking number parse response handling

* Fix test

* Fix namespace of test file

* Add tracking number parsing support for USPS shipping provider

* Add ambiguity scoring

* Add ambiguity scoring

* Shipping provider and test changes

* Modify USPS parser code

* Boost score when one of the countries is US

* Elaborate Surepost format

* Add all matches to parsing results, normalize tracking number

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add tracking number parsing support for FedEx shipping provider (#59248)

* Add shipping provider PNG image logos and replace base64 encoded images

* Add changefile(s) from automation for the following project(s): woocommerce

* Convert shipping provider configuration arrays into shipping provider classes, adapt UI and JS variable export to changes

* Add tests

* Fix namespace

* Fix class name case

* Fix another classname case issue

* Add tracking number parsing support for UPS shipping provider

* Fix shipping provider class initialization with DI

* Fix tracking number parse response handling

* Fix test

* Fix namespace of test file

* Add tracking number parsing support for USPS shipping provider

* Add ambiguity scoring

* Add ambiguity scoring

* Add tracking number parsing support for FedEx shipping provider

* Shipping provider and test changes

* Modify USPS parser code

* Shipping provider changes

* Boost score when one of the countries is US

* Elaborate Surepost format

* Add all matches to parsing results, normalize tracking number

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add tracking number parsing support for DHL shipping provider (#59249)

* Add shipping provider PNG image logos and replace base64 encoded images

* Add changefile(s) from automation for the following project(s): woocommerce

* Convert shipping provider configuration arrays into shipping provider classes, adapt UI and JS variable export to changes

* Add tests

* Fix namespace

* Fix class name case

* Fix another classname case issue

* Add tracking number parsing support for UPS shipping provider

* Fix shipping provider class initialization with DI

* Fix tracking number parse response handling

* Fix test

* Fix namespace of test file

* Add tracking number parsing support for USPS shipping provider

* Add ambiguity scoring

* Add ambiguity scoring

* Add tracking number parsing support for FedEx shipping provider

* Add tracking number parsing support for DHL shipping provider
### Submission Review Guidelines:

-   I have followed the [WooCommerce Contributing Guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) and the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).
-   I have checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce/pulls) for the same update/change.
-   I have reviewed my code for [security best practices](https://developer.wordpress.org/apis/security/).
-   Following the above guidelines will result in quick merges and clear and detailed feedback when appropriate.

### Changes proposed in this Pull Request:

This PR adds initial support for detecting and parsing DHL tracking numbers within the fulfillment provider system.

Closes #59204 WOOPLUG-4802

### How to test the changes in this Pull Request:

1. Checkout this branch
2. Run `pnpm run watch:build`
3. Run `composer dumpautoload` if needed
4. Go to WooCommerce > Orders and create a fulfillment if needed
5. In the shipping information box, enter the following tracking numbers:

#### ✅ Valid DHL
- `1234567890` (DE → US) → DHL (Score: 80)
- `JJD1234567890` (US → FR) → DHL (Score: 95)
- `JJD00123456789012` (GB → IT) → DHL (Score: 95)

#### ❌ Not DHL
- `INVALID1234` (DE → US)
- `JJD123` (JP → GB)
- `1234567890` (ZZ → US)

Verify correct results appear in the fulfillment drawer.

### Changelog entry

-   [x] This Pull Request does not require a changelog entry. (Comment required below)

<details>
<summary>Changelog Entry Details</summary>

#### Significance
-   [x] Patch

#### Type
-   [x] Add - Adds functionality

#### Message
</details>

<details>
<summary>Changelog Entry Comment</summary>

#### Comment
This is a part of a feature branch which will have a single changelog entry when merged to trunk.
</details>

* Shipping provider and test changes

* Modify USPS parser code

* Shipping provider changes

* Shipping provider changes

* Boost score when one of the countries is US

* Elaborate Surepost format

* Add all matches to parsing results, normalize tracking number

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add tracking number parsing support for Amazon Logistics shipping provider (#59250)

* Add shipping provider PNG image logos and replace base64 encoded images

* Add changefile(s) from automation for the following project(s): woocommerce

* Convert shipping provider configuration arrays into shipping provider classes, adapt UI and JS variable export to changes

* Add tests

* Fix namespace

* Fix class name case

* Fix another classname case issue

* Add tracking number parsing support for UPS shipping provider

* Fix shipping provider class initialization with DI

* Fix tracking number parse response handling

* Fix test

* Fix namespace of test file

* Add tracking number parsing support for USPS shipping provider

* Add ambiguity scoring

* Add ambiguity scoring

* Add tracking number parsing support for FedEx shipping provider

* Add tracking number parsing support for DHL shipping provider
### Submission Review Guidelines:

-   I have followed the [WooCommerce Contributing Guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) and the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).
-   I have checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce/pulls) for the same update/change.
-   I have reviewed my code for [security best practices](https://developer.wordpress.org/apis/security/).
-   Following the above guidelines will result in quick merges and clear and detailed feedback when appropriate.

### Changes proposed in this Pull Request:

This PR adds initial support for detecting and parsing DHL tracking numbers within the fulfillment provider system.

Closes #59204 WOOPLUG-4802

### How to test the changes in this Pull Request:

1. Checkout this branch
2. Run `pnpm run watch:build`
3. Run `composer dumpautoload` if needed
4. Go to WooCommerce > Orders and create a fulfillment if needed
5. In the shipping information box, enter the following tracking numbers:

#### ✅ Valid DHL
- `1234567890` (DE → US) → DHL (Score: 80)
- `JJD1234567890` (US → FR) → DHL (Score: 95)
- `JJD00123456789012` (GB → IT) → DHL (Score: 95)

#### ❌ Not DHL
- `INVALID1234` (DE → US)
- `JJD123` (JP → GB)
- `1234567890` (ZZ → US)

Verify correct results appear in the fulfillment drawer.

### Changelog entry

-   [x] This Pull Request does not require a changelog entry. (Comment required below)

<details>
<summary>Changelog Entry Details</summary>

#### Significance
-   [x] Patch

#### Type
-   [x] Add - Adds functionality

#### Message
</details>

<details>
<summary>Changelog Entry Comment</summary>

#### Comment
This is a part of a feature branch which will have a single changelog entry when merged to trunk.
</details>

* Add tracking number parsing support for Amazon Logistics shipping provider
### Submission Review Guidelines:

-   I have followed the [WooCommerce Contributing Guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) and the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).
-   I have checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce/pulls) for the same update/change.
-   I have reviewed my code for [security best practices](https://developer.wordpress.org/apis/security/).

### Changes proposed in this Pull Request:

This PR adds initial support for detecting and parsing **Amazon Logistics (TBA...)** tracking numbers in the fulfillment provider system. Amazon tracking numbers typically start with `TBA` and are specific to Amazon's delivery network.

Closes #59233 WOOPLUG-4816

### How to test the changes in this Pull Request:

1. Checkout this branch
2. Run `pnpm run watch:build`
3. Run `composer dumpautoload` if needed
4. Go to WooCommerce > Orders and create a fulfillment if you don't have one.
5. In the fulfillment shipping info box, use tracking numbers like the following:

```md
- TBA1234567890 (US → US) → ✅ Amazon Logistics
- TBA000000000X (CA → CA) → ✅ Amazon Logistics
- tba111222333 (GB → DE) → ✅ Amazon Logistics
- TBX1234567890 (US → US) → ❌ Not Amazon Logistics
- TBA1234567890 (US → BR) → ❌ Not Amazon Logistics

* Fix tests

* Shipping provider and test changes

* Modify USPS parser code

* Shipping provider changes

* Shipping provider changes

* Shipping provider changes

* Fix lint errors

* Boost score when one of the countries is US

* Elaborate Surepost format

* Add all matches to parsing results, normalize tracking number

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add tracking number parsing support for DPD shipping provider (#59256)

* Add shipping provider PNG image logos and replace base64 encoded images

* Add changefile(s) from automation for the following project(s): woocommerce

* Convert shipping provider configuration arrays into shipping provider classes, adapt UI and JS variable export to changes

* Add tests

* Fix namespace

* Fix class name case

* Fix another classname case issue

* Add tracking number parsing support for UPS shipping provider

* Fix shipping provider class initialization with DI

* Fix tracking number parse response handling

* Fix test

* Fix namespace of test file

* Add tracking number parsing support for USPS shipping provider

* Add ambiguity scoring

* Add ambiguity scoring

* Add tracking number parsing support for FedEx shipping provider

* Add tracking number parsing support for DHL shipping provider
### Submission Review Guidelines:

-   I have followed the [WooCommerce Contributing Guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) and the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).
-   I have checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce/pulls) for the same update/change.
-   I have reviewed my code for [security best practices](https://developer.wordpress.org/apis/security/).
-   Following the above guidelines will result in quick merges and clear and detailed feedback when appropriate.

### Changes proposed in this Pull Request:

This PR adds initial support for detecting and parsing DHL tracking numbers within the fulfillment provider system.

Closes #59204 WOOPLUG-4802

### How to test the changes in this Pull Request:

1. Checkout this branch
2. Run `pnpm run watch:build`
3. Run `composer dumpautoload` if needed
4. Go to WooCommerce > Orders and create a fulfillment if needed
5. In the shipping information box, enter the following tracking numbers:

#### ✅ Valid DHL
- `1234567890` (DE → US) → DHL (Score: 80)
- `JJD1234567890` (US → FR) → DHL (Score: 95)
- `JJD00123456789012` (GB → IT) → DHL (Score: 95)

#### ❌ Not DHL
- `INVALID1234` (DE → US)
- `JJD123` (JP → GB)
- `1234567890` (ZZ → US)

Verify correct results appear in the fulfillment drawer.

### Changelog entry

-   [x] This Pull Request does not require a changelog entry. (Comment required below)

<details>
<summary>Changelog Entry Details</summary>

#### Significance
-   [x] Patch

#### Type
-   [x] Add - Adds functionality

#### Message
</details>

<details>
<summary>Changelog Entry Comment</summary>

#### Comment
This is a part of a feature branch which will have a single changelog entry when merged to trunk.
</details>

* Add tracking number parsing support for Amazon Logistics shipping provider
### Submission Review Guidelines:

-   I have followed the [WooCommerce Contributing Guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) and the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).
-   I have checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce/pulls) for the same update/change.
-   I have reviewed my code for [security best practices](https://developer.wordpress.org/apis/security/).

### Changes proposed in this Pull Request:

This PR adds initial support for detecting and parsing **Amazon Logistics (TBA...)** tracking numbers in the fulfillment provider system. Amazon tracking numbers typically start with `TBA` and are specific to Amazon's delivery network.

Closes #59233 WOOPLUG-4816

### How to test the changes in this Pull Request:

1. Checkout this branch
2. Run `pnpm run watch:build`
3. Run `composer dumpautoload` if needed
4. Go to WooCommerce > Orders and create a fulfillment if you don't have one.
5. In the fulfillment shipping info box, use tracking numbers like the following:

```md
- TBA1234567890 (US → US) → ✅ Amazon Logistics
- TBA000000000X (CA → CA) → ✅ Amazon Logistics
- tba111222333 (GB → DE) → ✅ Amazon Logistics
- TBX1234567890 (US → US) → ❌ Not Amazon Logistics
- TBA1234567890 (US → BR) → ❌ Not Amazon Logistics

* Fix tests

* Add tracking number parsing support for DPD shipping provider

* Shipping provider and test changes

* Modify USPS parser code

* Shipping provider changes

* Shipping provider changes

* Shipping provider changes

* Fix lint errors

* Shipping provider changes

* Fix linter error

* Boost score when one of the countries is US

* Elaborate Surepost format

* Add all matches to parsing results, normalize tracking number

* Prioritize DPD over FedEx in EU

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add tracking number parsing support for Evri (Hermes) shipping provider (#59298)

* Add shipping provider PNG image logos and replace base64 encoded images

* Add changefile(s) from automation for the following project(s): woocommerce

* Convert shipping provider configuration arrays into shipping provider classes, adapt UI and JS variable export to changes

* Add tests

* Fix namespace

* Fix class name case

* Fix another classname case issue

* Add tracking number parsing support for UPS shipping provider

* Fix shipping provider class initialization with DI

* Fix tracking number parse response handling

* Fix test

* Fix namespace of test file

* Add tracking number parsing support for USPS shipping provider

* Add ambiguity scoring

* Add ambiguity scoring

* Add tracking number parsing support for FedEx shipping provider

* Add tracking number parsing support for DHL shipping provider
### Submission Review Guidelines:

-   I have followed the [WooCommerce Contributing Guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) and the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).
-   I have checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce/pulls) for the same update/change.
-   I have reviewed my code for [security best practices](https://developer.wordpress.org/apis/security/).
-   Following the above guidelines will result in quick merges and clear and detailed feedback when appropriate.

### Changes proposed in this Pull Request:

This PR adds initial support for detecting and parsing DHL tracking numbers within the fulfillment provider system.

Closes #59204 WOOPLUG-4802

### How to test the changes in this Pull Request:

1. Checkout this branch
2. Run `pnpm run watch:build`
3. Run `composer dumpautoload` if needed
4. Go to WooCommerce > Orders and create a fulfillment if needed
5. In the shipping information box, enter the following tracking numbers:

#### ✅ Valid DHL
- `1234567890` (DE → US) → DHL (Score: 80)
- `JJD1234567890` (US → FR) → DHL (Score: 95)
- `JJD00123456789012` (GB → IT) → DHL (Score: 95)

#### ❌ Not DHL
- `INVALID1234` (DE → US)
- `JJD123` (JP → GB)
- `1234567890` (ZZ → US)

Verify correct results appear in the fulfillment drawer.

### Changelog entry

-   [x] This Pull Request does not require a changelog entry. (Comment required below)

<details>
<summary>Changelog Entry Details</summary>

#### Significance
-   [x] Patch

#### Type
-   [x] Add - Adds functionality

#### Message
</details>

<details>
<summary>Changelog Entry Comment</summary>

#### Comment
This is a part of a feature branch which will have a single changelog entry when merged to trunk.
</details>

* Add tracking number parsing support for Amazon Logistics shipping provider
### Submission Review Guidelines:

-   I have followed the [WooCommerce Contributing Guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) and the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).
-   I have checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce/pulls) for the same update/change.
-   I have reviewed my code for [security best practices](https://developer.wordpress.org/apis/security/).

### Changes proposed in this Pull Request:

This PR adds initial support for detecting and parsing **Amazon Logistics (TBA...)** tracking numbers in the fulfillment provider system. Amazon tracking numbers typically start with `TBA` and are specific to Amazon's delivery network.

Closes #59233 WOOPLUG-4816

### How to test the changes in this Pull Request:

1. Checkout this branch
2. Run `pnpm run watch:build`
3. Run `composer dumpautoload` if needed
4. Go to WooCommerce > Orders and create a fulfillment if you don't have one.
5. In the fulfillment shipping info box, use tracking numbers like the following:

```md
- TBA1234567890 (US → US) → ✅ Amazon Logistics
- TBA000000000X (CA → CA) → ✅ Amazon Logistics
- tba111222333 (GB → DE) → ✅ Amazon Logistics
- TBX1234567890 (US → US) → ❌ Not Amazon Logistics
- TBA1234567890 (US → BR) → ❌ Not Amazon Logistics

* Fix tests

* Add tracking number parsing support for DPD shipping provider

* Shipping provider and test changes

* Modify USPS parser code

* Shipping provider changes

* Shipping provider changes

* Shipping provider changes

* Fix lint errors

* Shipping provider changes

* Fix linter error

* Add tracking number parsing support for Evri (Hermes) shipping provider

* Boost score when one of the countries is US

* Elaborate Surepost format

* Add all matches to parsing results, normalize tracking number

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add tracking number parsing support for Canada Post shipping provider (#59308)

* Add shipping provider PNG image logos and replace base64 encoded images

* Add changefile(s) from automation for the following project(s): woocommerce

* Convert shipping provider configuration arrays into shipping provider classes, adapt UI and JS variable export to changes

* Add tests

* Fix namespace

* Fix class name case

* Fix another classname case issue

* Add tracking number parsing support for UPS shipping provider

* Fix shipping provider class initialization with DI

* Fix tracking number parse response handling

* Fix test

* Fix namespace of test file

* Add tracking number parsing support for USPS shipping provider

* Add ambiguity scoring

* Add ambiguity scoring

* Add tracking number parsing support for FedEx shipping provider

* Add tracking number parsing support for DHL shipping provider
### Submission Review Guidelines:

-   I have followed the [WooCommerce Contributing Guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) and the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).
-   I have checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce/pulls) for the same update/change.
-   I have reviewed my code for [security best practices](https://developer.wordpress.org/apis/security/).
-   Following the above guidelines will result in quick merges and clear and detailed feedback when appropriate.

### Changes proposed in this Pull Request:

This PR adds initial support for detecting and parsing DHL tracking numbers within the fulfillment provider system.

Closes #59204 WOOPLUG-4802

### How to test the changes in this Pull Request:

1. Checkout this branch
2. Run `pnpm run watch:build`
3. Run `composer dumpautoload` if needed
4. Go to WooCommerce > Orders and create a fulfillment if needed
5. In the shipping information box, enter the following tracking numbers:

#### ✅ Valid DHL
- `1234567890` (DE → US) → DHL (Score: 80)
- `JJD1234567890` (US → FR) → DHL (Score: 95)
- `JJD00123456789012` (GB → IT) → DHL (Score: 95)

#### ❌ Not DHL
- `INVALID1234` (DE → US)
- `JJD123` (JP → GB)
- `1234567890` (ZZ → US)

Verify correct results appear in the fulfillment drawer.

### Changelog entry

-   [x] This Pull Request does not require a changelog entry. (Comment required below)

<details>
<summary>Changelog Entry Details</summary>

#### Significance
-   [x] Patch

#### Type
-   [x] Add - Adds functionality

#### Message
</details>

<details>
<summary>Changelog Entry Comment</summary>

#### Comment
This is a part of a feature branch which will have a single changelog entry when merged to trunk.
</details>

* Add tracking number parsing support for Amazon Logistics shipping provider
### Submission Review Guidelines:

-   I have followed the [WooCommerce Contributing Guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) and the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).
-   I have checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce/pulls) for the same update/change.
-   I have reviewed my code for [security best practices](https://developer.wordpress.org/apis/security/).

### Changes proposed in this Pull Request:

This PR adds initial support for detecting and parsing **Amazon Logistics (TBA...)** tracking numbers in the fulfillment provider system. Amazon tracking numbers typically start with `TBA` and are specific to Amazon's delivery network.

Closes #59233 WOOPLUG-4816

### How to test the changes in this Pull Request:

1. Checkout this branch
2. Run `pnpm run watch:build`
3. Run `composer dumpautoload` if needed
4. Go to WooCommerce > Orders and create a fulfillment if you don't have one.
5. In the fulfillment shipping info box, use tracking numbers like the following:

```md
- TBA1234567890 (US → US) → ✅ Amazon Logistics
- TBA000000000X (CA → CA) → ✅ Amazon Logistics
- tba111222333 (GB → DE) → ✅ Amazon Logistics
- TBX1234567890 (US → US) → ❌ Not Amazon Logistics
- TBA1234567890 (US → BR) → ❌ Not Amazon Logistics

* Fix tests

* Add tracking number parsing support for DPD shipping provider

* Shipping provider and test changes

* Modify USPS parser code

* Shipping provider changes

* Shipping provider changes

* Shipping provider changes

* Fix lint errors

* Shipping provider changes

* Fix linter error

* Add tracking number parsing support for Evri (Hermes) shipping provider

* Boost score when one of the countries is US

* Elaborate Surepost format

* Add all matches to parsing results, normalize tracking number

* Add Canada Post shipping provider tracking number parsing

* Add Canada Post icon

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add Royal Mail shipping provider tracking number parsing (#59311)

* Add shipping provider PNG image logos and replace base64 encoded images

* Add changefile(s) from automation for the following project(s): woocommerce

* Convert shipping provider configuration arrays into shipping provider classes, adapt UI and JS variable export to changes

* Add tests

* Fix namespace

* Fix class name case

* Fix another classname case issue

* Add tracking number parsing support for UPS shipping provider

* Fix shipping provider class initialization with DI

* Fix tracking number parse response handling

* Fix test

* Fix namespace of test file

* Add tracking number parsing support for USPS shipping provider

* Add ambiguity scoring

* Add ambiguity scoring

* Add tracking number parsing support for FedEx shipping provider

* Add tracking number parsing support for DHL shipping provider
### Submission Review Guidelines:

-   I have followed the [WooCommerce Contributing Guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) and the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).
-   I have checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce/pulls) for the same update/change.
-   I have reviewed my code for [security best practices](https://developer.wordpress.org/apis/security/).
-   Following the above guidelines will result in quick merges and clear and detailed feedback when appropriate.

### Changes proposed in this Pull Request:

This PR adds initial support for detecting and parsing DHL tracking numbers within the fulfillment provider system.

Closes #59204 WOOPLUG-4802

### How to test the changes in this Pull Request:

1. Checkout this branch
2. Run `pnpm run watch:build`
3. Run `composer dumpautoload` if needed
4. Go to WooCommerce > Orders and create a fulfillment if needed
5. In the shipping information box, enter the following tracking numbers:

#### ✅ Valid DHL
- `1234567890` (DE → US) → DHL (Score: 80)
- `JJD1234567890` (US → FR) → DHL (Score: 95)
- `JJD00123456789012` (GB → IT) → DHL (Score: 95)

#### ❌ Not DHL
- `INVALID1234` (DE → US)
- `JJD123` (JP → GB)
- `1234567890` (ZZ → US)

Verify correct results appear in the fulfillment drawer.

### Changelog entry

-   [x] This Pull Request does not require a changelog entry. (Comment required below)

<details>
<summary>Changelog Entry Details</summary>

#### Significance
-   [x] Patch

#### Type
-   [x] Add - Adds functionality

#### Message
</details>

<details>
<summary>Changelog Entry Comment</summary>

#### Comment
This is a part of a feature branch which will have a single changelog entry when merged to trunk.
</details>

* Add tracking number parsing support for Amazon Logistics shipping provider
### Submission Review Guidelines:

-   I have followed the [WooCommerce Contributing Guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) and the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).
-   I have checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce/pulls) for the same update/change.
-   I have reviewed my code for [security best practices](https://developer.wordpress.org/apis/security/).

### Changes proposed in this Pull Request:

This PR adds initial support for detecting and parsing **Amazon Logistics (TBA...)** tracking numbers in the fulfillment provider system. Amazon tracking numbers typically start with `TBA` and are specific to Amazon's delivery network.

Closes #59233 WOOPLUG-4816

### How to test the changes in this Pull Request:

1. Checkout this branch
2. Run `pnpm run watch:build`
3. Run `composer dumpautoload` if needed
4. Go to WooCommerce > Orders and create a fulfillment if you don't have one.
5. In the fulfillment shipping info box, use tracking numbers like the following:

```md
- TBA1234567890 (US → US) → ✅ Amazon Logistics
- TBA000000000X (CA → CA) → ✅ Amazon Logistics
- tba111222333 (GB → DE) → ✅ Amazon Logistics
- TBX1234567890 (US → US) → ❌ Not Amazon Logistics
- TBA1234567890 (US → BR) → ❌ Not Amazon Logistics

* Fix tests

* Add tracking number parsing support for DPD shipping provider

* Shipping provider and test changes

* Modify USPS parser code

* Shipping provider changes

* Shipping provider changes

* Shipping provider changes

* Fix lint errors

* Shipping provider changes

* Fix linter error

* Add tracking number parsing support for Evri (Hermes) shipping provider

* Boost score when one of the countries is US

* Elaborate Surepost format

* Add all matches to parsing results, normalize tracking number

* Add Canada Post shipping provider tracking number parsing

* Add Canada Post icon

* Add Royal Mail shipping provider tracking number parsing

* Add S10 check digit validation for UPU format

* Fix wrong merge and failing tests because of it

* Fix comment

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add Australia Post shipping provider tracking number parsing (#59320)

* Add shipping provider PNG image logos and replace base64 encoded images

* Add changefile(s) from automation for the following project(s): woocommerce

* Convert shipping provider configuration arrays into shipping provider classes, adapt UI and JS variable export to changes

* Add tests

* Fix namespace

* Fix class name case

* Fix another classname case issue

* Add tracking number parsing support for UPS shipping provider

* Fix shipping provider class initialization with DI

* Fix tracking number parse response handling

* Fix test

* Fix namespace of test file

* Add tracking number parsing support for USPS shipping provider

* Add ambiguity scoring

* Add ambiguity scoring

* Add tracking number parsing support for FedEx shipping provider

* Add tracking number parsing support for DHL shipping provider
### Submission Review Guidelines:

-   I have followed the [WooCommerce Contributing Guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) and the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).
-   I have checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce/pulls) for the same update/change.
-   I have reviewed my code for [security best practices](https://developer.wordpress.org/apis/security/).
-   Following the above guidelines will result in quick merges and clear and detailed feedback when appropriate.

### Changes proposed in this Pull Request:

This PR adds initial support for detecting and parsing DHL tracking numbers within the fulfillment provider system.

Closes #59204 WOOPLUG-4802

### How to test the changes in this Pull Request:

1. Checkout this branch
2. Run `pnpm run watch:build`
3. Run `composer dumpautoload` if needed
4. Go to WooCommerce > Orders and create a fulfillment if needed
5. In the shipping information box, enter the following tracking numbers:

#### ✅ Valid DHL
- `1234567890` (DE → US) → DHL (Score: 80)
- `JJD1234567890` (US → FR) → DHL (Score: 95)
- `JJD00123456789012` (GB → IT) → DHL (Score: 95)

#### ❌ Not DHL
- `INVALID1234` (DE → US)
- `JJD123` (JP → GB)
- `1234567890` (ZZ → US)

Verify correct results appear in the fulfillment drawer.

### Changelog entry

-   [x] This Pull Request does not require a changelog entry. (Comment required below)

<details>
<summary>Changelog Entry Details</summary>

#### Significance
-   [x] Patch

#### Type
-   [x] Add - Adds functionality

#### Message
</details>

<details>
<summary>Changelog Entry Comment</summary>

#### Comment
This is a part of a feature branch which will have a single changelog entry when merged to trunk.
</details>

* Add tracking number parsing support for Amazon Logistics shipping provider
### Submission Review Guidelines:

-   I have followed the [WooCommerce Contributing Guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) and the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).
-   I have checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce/pulls) for the same update/change.
-   I have reviewed my code for [security best practices](https://developer.wordpress.org/apis/security/).

### Changes proposed in this Pull Request:

This PR adds initial support for detecting and parsing **Amazon Logistics (TBA...)** tracking numbers in the fulfillment provider system. Amazon tracking numbers typically start with `TBA` and are specific to Amazon's delivery network.

Closes #59233 WOOPLUG-4816

### How to test the changes in this Pull Request:

1. Checkout this branch
2. Run `pnpm run watch:build`
3. Run `composer dumpautoload` if needed
4. Go to WooCommerce > Orders and create a fulfillment if you don't have one.
5. In the fulfillment shipping info box, use tracking numbers like the following:

```md
- TBA1234567890 (US → US) → ✅ Amazon Logistics
- TBA000000000X (CA → CA) → ✅ Amazon Logistics
- tba111222333 (GB → DE) → ✅ Amazon Logistics
- TBX1234567890 (US → US) → ❌ Not Amazon Logistics
- TBA1234567890 (US → BR) → ❌ Not Amazon Logistics

* Fix tests

* Add tracking number parsing support for DPD shipping provider

* Shipping provider and test changes

* Modify USPS parser code

* Shipping provider changes

* Shipping provider changes

* Shipping provider changes

* Fix lint errors

* Shipping provider changes

* Fix linter error

* Add tracking number parsing support for Evri (Hermes) shipping provider

* Boost score when one of the countries is US

* Elaborate Surepost format

* Add all matches to parsing results, normalize tracking number

* Add Canada Post shipping provider tracking number parsing

* Add Canada Post icon

* Add Royal Mail shipping provider tracking number parsing

* Add S10 check digit validation for UPU format

* Add Australia Post shipping provider tracking number parsing

* Add Australia Post logo

* Join country list to one single line

* Fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add feature flag for order fulfillments (#59148)

* Add feature flag for order fulfillments

* Add changefile(s) from automation for the following project(s): woocommerce

* Isolate email modifications with feature flag

* Fix tests

* Move DB schema from installation to activation

* Add DB tables only when the feature is first enabled, hide feature UI

* Fix tests

* Fix more tests

* Remove the condition for adding fulfillments tables, make them always listed

---------

Co-authored-by: github-actions <github-actions@github.com>

* Fix fulfillments UI design issues found in design review (#59380)

* Change chevron direction, remove bulk selection labels, collapse new fulfillment form

* Prevent body scrolling on drawer open, refactor drawer classes, scroll to error message on error

* Make "Other" shipping provider option sticky at bottom

* Update order fulfillment status in real time

* Fix tests

* Disable collapsing when there's only one fulfillment with all items in the drawer

* Fix lint and test issues

* Fix hasPendingItems method, clear error messages when order changes

* Fix CSS style lint issues, formatter breaks it

* Fix scrollintoview margin issue

* Merge branch 'feature/57353-order-fulfillments-entity' into fix/58715-fix-design-review-problems

* Fix lint error caused by line length limit

* Align price text to right

* Fix lint error

* Add mocking for scrollIntoView in jest tests

* Add UX improvements for tracking number lookup (#59427)

* Add UX improvements for tracking number resolution

* Fix linter error

* Fix tests

* Remove unnecessary utility, fix conditional rendering

* Add support for querying deleted fulfillments programmatically on backend (#59504)

* Add refunds handling to fulfillments (#59585)

* Add refunds handling to fulfillments

* Don't remove refunded item…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: woocommerce Issues related to the WooCommerce Core plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Order fulfillments] Add shipping providers support
2 participants