Repository navigation
Conversation
…ulfillmentUtils on WC 11+
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 1 file.
Full summary · PHP report · JS report Coverage check overridden by
Covered by non-unit tests
|
Part of WOOA7S-2265
Proposed changes
wc_order_statsrows, butwoocommerce_order_scheduler_after_import_orderfires once, for the order, so hosted refund rows went stale when their order changed. A refund the import left without a row (excluded or deleted) is not resent.FulfillmentUtilsin either namespace. It moved toAdmin\Features\Fulfillmentsin WooCommerce 10.7, so on stores without thefulfillment_statuscolumn the module sentnullinstead of the order's fulfillment status.In scheduled imports, a refund imported in the same batch as its order is sent twice; the second copy carries the row the order's import rewrote.
Related product discussion/links
Does this pull request change what data or activity we track or use?
No. It sends the same actions and payload. A refund is sent once more when its order is imported.
Testing instructions
Setup: a connected site with WooCommerce 10.3 or later, Analytics enabled, and Premium Analytics (or Jetpack) built from this branch. Add an mu-plugin that logs each synced order ID:
Refunds resent with their order
wp action-scheduler run --group=wc-admin-data.wc-admin_process_pending_orders_batchaction from WooCommerce > Status > Scheduled Actions instead.Fulfillment status on WooCommerce 10.7 to 11.4
wp db query "ALTER TABLE wp_wc_order_stats DROP COLUMN fulfillment_status"and runwp option update woocommerce_order_stats_has_fulfillment_column no._fulfillment_statusmeta set topartially_fulfilled) and save it, then run the imports.fulfillmentis'partially_fulfilled'. On trunk it isNULL.