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

Commit

Permalink
Merge pull request #117 from szepeviktor/fix-no2
Browse files Browse the repository at this point in the history
$table_data was in the wrong file
  • Loading branch information
stevegrunwell authored Apr 29, 2019
2 parents 65ed90e + ea6185c commit 1396f73
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
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

0 comments on commit 1396f73

Please sign in to comment.