fixed order get_total_refunded() method
This commit is contained in:
parent
d2340a5cef
commit
299c12bd57
|
@ -62,9 +62,11 @@ class WC_Order extends WC_Abstract_Order {
|
||||||
FROM $wpdb->postmeta AS postmeta
|
FROM $wpdb->postmeta AS postmeta
|
||||||
INNER JOIN $wpdb->posts AS posts ON ( posts.post_type = 'shop_order_refund' AND posts.post_parent = %d )
|
INNER JOIN $wpdb->posts AS posts ON ( posts.post_type = 'shop_order_refund' AND posts.post_parent = %d )
|
||||||
WHERE postmeta.meta_key = '_refund_amount'
|
WHERE postmeta.meta_key = '_refund_amount'
|
||||||
GROUP BY posts.ID
|
AND postmeta.post_id = posts.ID
|
||||||
", $this->id ) );
|
", $this->id ) );
|
||||||
|
|
||||||
|
error_log( print_r( $this->id, true ) );
|
||||||
|
|
||||||
return $total;
|
return $total;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue