You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.
There is an issue with the migration of refunded orders to the custom table. I am running the wp wc-order-table migrate command and it is silently skipping the refunded orders, while other orders are updated just fine.
I have done a little debugging and it appears the call to populate_from_meta() on the data store is failing, in WooCommerce_Custom_Orders_Table_CLI::migrate().
This line specifically - $result = $order->get_data_store()->populate_from_meta( $order );
That call is returning NULL which is fails the error check on the line below, so there is no error reporting at all when this happens.
The text was updated successfully, but these errors were encountered:
@zacscott congrats, you've stumbled upon a much larger issue with the plugin!
As it turns out, WooCommerce uses a separate data store for refunds than orders (though they're closely related), so the CLI command was looking for all posts with types matching wc_get_order_types( 'reports' ) (e.g. ("shop_order" or "shop_order_refund") but only actually handling the former.
I'm working on a patch right now that will introduce the necessary data store to let refunds leverage the custom orders table as well. Thank you for catching this!
There is an issue with the migration of refunded orders to the custom table. I am running the
wp wc-order-table migrate
command and it is silently skipping the refunded orders, while other orders are updated just fine.I have done a little debugging and it appears the call to
populate_from_meta()
on the data store is failing, inWooCommerce_Custom_Orders_Table_CLI::migrate()
.This line specifically -
$result = $order->get_data_store()->populate_from_meta( $order );
That call is returning
NULL
which is fails the error check on the line below, so there is no error reporting at all when this happens.The text was updated successfully, but these errors were encountered: