woocommerce/plugins
Vedanshu Jain b2c3ef8f29
Add support for refunds and other order types in custom order tables (#34050)
* Add suppport for types and refund in migrations.

* Add changelog.

* Make CI happy.

* Add support for refunds save and read.

* Remove placeholder from order types eligible for migration.

* Link backfilling to migration process.

* Add changelog.

* Reduce batch size for backfilling since it is slower.

* Correct grammer.

* Link backfilling with data synchronizer and adopt with pending migration on both sides.

We already have backfilling implemented, however it was not linked. This would make switching data stores back to posts table not possible. This commit links datasynchronizer so that it can both migrate as well as backfill.

* Remove _recorded_sales from skipped check keys since its implemented.

* Share concrete instance of cot controller to share feature value.

* Revert adding concrete controller, object instance is already shared.

* remove yoda condition.

* Remove unintended change.

* Add types in unit test since we added it in schema.

* Remove unsetting type, its supported now.

* Add support for backfilling order types with different datastores.

* Use correct datastore while migrating.

* Support -1 for limit queries

* Order factory to support reading multiple order types.

* Add read_multiple to refunds data store.

* Return negative total for consistency with posts table implementation.

In custom tables, we can directly sum the value for total_amount since they are being stored in flat tables, instead of relying on _refund_amount meta.

* Remove type definations for back compat.

* Add test for get_orders

* Use persist_udpates method for consistency and DRY.

* Resolve conflict correctly.

* Removed duplicated methods.

* Use correct order in doc comment.

* Fix typo

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>

* Rename parameter for better clarity.

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2022-08-24 14:33:03 -05:00
..
woocommerce Add support for refunds and other order types in custom order tables (#34050) 2022-08-24 14:33:03 -05:00
woocommerce-admin Hide finish setup button when task list is disabled (#34410) 2022-08-24 09:39:01 +08:00
woocommerce-beta-tester Simplify turbo commands (#34055) 2022-08-05 12:03:17 +12:00