Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableDataStore::migrate_meta_data_from_post_order()privateWC 1.0

Migrate meta data from post to order.

Method of the class: OrdersTableDataStore{}

No Hooks.

Return

Array. List of meta data that was migrated.

Usage

// private - for code of main (parent) class only
$result = $this->migrate_meta_data_from_post_order( $order, $post_order );
$order(\WC_Abstract_Order) (required)
Order object.
$post_order(\WC_Abstract_Order) (required)
Order object read from posts table.

OrdersTableDataStore::migrate_meta_data_from_post_order() code WC 7.1.0

private function migrate_meta_data_from_post_order( \WC_Abstract_Order &$order, \WC_Abstract_Order $post_order ) {
	$diff = $this->get_diff_meta_data_between_orders( $order, $post_order, true );
	$order->save_meta_data();
	return $diff;
}