Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

$table_data was in the wrong file #117

Merged
merged 2 commits into from
Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion includes/class-wc-order-refund-data-store-custom-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
1 change: 1 addition & 0 deletions includes/class-woocommerce-custom-orders-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down