[Backport to release/10.7] [WOOPLUG-6360+6047] Add custom shipping providers and provider filter#63879
Conversation
Testing GuidelinesHi @tpaksu , 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:
|
|
Size Change: +3.48 kB (+0.06%) Total Size: 5.98 MB
|
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. 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. |
This PR is a cherry-pick of #63766 to
release/10.7.Original PR Description
Submission Review Guidelines:
Fixes WOOPLUG-6360 WOOPLUG-6047
Changes proposed in this Pull Request:
This PR implements two related features for the WooCommerce Fulfillments system:
WOOPLUG-6360: Custom Shipping Providers
wc_fulfillment_shipping_providerWordPress taxonomy to store custom providersCustomShippingProviderclass extendingAbstractShippingProviderwith tracking URL template support (__PLACEHOLDER__replacement)woocommerce_fulfillment_shipping_providersfilter at priority 20 (after built-ins at 10)shipping_providers_save_changes) for create/update/delete operationsWOOPLUG-6047: Filter by Shipping Provider
wc_order_fulfillmentsandwc_order_fulfillment_metatablesCloses # .
Screenshots or screen recordings:
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Basic functionality
woocommerce_feature_fulfillments_enabled=yes).https://example.com/track?id=__PLACEHOLDER__), and optionally a slug and icon URL.Slug uniqueness and immutability
ups(or any built-in provider key). Verify it is rejected with an error message about the slug being already in use.ups).URL validation
not-a-url). Verify the value is silently discarded (stored as empty).ftp://orjavascript:tracking URL. Verify it is rejected (onlyhttp://andhttps://are accepted).Deletion protection
Feature flag gating
woocommerce_feature_fulfillments_enabled=no).?page=wc-settings&tab=shipping§ion=fulfillment-providers. Verify the providers screen does not render.Placeholder icon (TruckIcon fallback)
Testing that has already taken place:
CustomShippingProviderTest, 16 forFulfillmentsManagerTest)Milestone
Automatically assign milestone for the next WooCommerce versionChangelog 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
Type
Message
Add custom shipping providers settings UI and shipping provider filter for the orders list.
Changelog Entry Comment
Comment