diff --git a/includes/class-wc-order-refund-data-store-custom-table.php b/includes/class-wc-order-refund-data-store-custom-table.php index 39a896b..5af66e4 100644 --- a/includes/class-wc-order-refund-data-store-custom-table.php +++ b/includes/class-wc-order-refund-data-store-custom-table.php @@ -131,7 +131,6 @@ protected function update_post_meta( &$refund ) { public function populate_from_meta( &$refund, $delete = false ) { global $wpdb; - $table_data = $this->get_order_data_from_table( $refund ); $refund = WooCommerce_Custom_Orders_Table::populate_order_from_post_meta( $refund ); $this->update_post_meta( $refund ); diff --git a/includes/class-woocommerce-custom-orders-table.php b/includes/class-woocommerce-custom-orders-table.php index f1b934f..08e496c 100644 --- a/includes/class-woocommerce-custom-orders-table.php +++ b/includes/class-woocommerce-custom-orders-table.php @@ -154,6 +154,7 @@ public static function populate_order_from_post_meta( $order ) { foreach ( WooCommerce_Custom_Orders_Table::get_postmeta_mapping() as $column => $meta_key ) { $meta = get_post_meta( $order->get_id(), $meta_key, true ); + $table_data = $order->get_data_store()->get_order_data_from_table( $order ); if ( empty( $table_data->$column ) && ! empty( $meta ) ) { switch ( $column ) { case 'billing_index':