From 48ef33636fe4adc21ca27e9ba4388df9c8fa9a08 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 1 Feb 2019 18:31:10 -0200 Subject: [PATCH] Removed extra function from conflicts --- ...s-wc-admin-reports-products-data-store.php | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/plugins/woocommerce-admin/includes/data-stores/class-wc-admin-reports-products-data-store.php b/plugins/woocommerce-admin/includes/data-stores/class-wc-admin-reports-products-data-store.php index b85b86aa76c..0148c1726e9 100644 --- a/plugins/woocommerce-admin/includes/data-stores/class-wc-admin-reports-products-data-store.php +++ b/plugins/woocommerce-admin/includes/data-stores/class-wc-admin-reports-products-data-store.php @@ -386,28 +386,4 @@ class WC_Admin_Reports_Products_Data_Store extends WC_Admin_Reports_Data_Store i } } } - - /** - * Get order refund items quantity and subtotal - * - * @param object $order WC Order object. - * @return array - */ - public static function get_order_refund_items( $order ) { - $refunds = $order->get_refunds(); - $refunded_line_items = array(); - foreach ( $refunds as $refund ) { - foreach ( $refund->get_items() as $refunded_item ) { - $line_item_id = wc_get_order_item_meta( $refunded_item->get_id(), '_refunded_item_id', true ); - if ( ! isset( $refunded_line_items[ $line_item_id ] ) ) { - $refunded_line_items[ $line_item_id ]['quantity'] = 0; - $refunded_line_items[ $line_item_id ]['subtotal'] = 0; - } - $refunded_line_items[ $line_item_id ]['quantity'] += absint( $refunded_item['quantity'] ); - $refunded_line_items[ $line_item_id ]['subtotal'] += abs( $refunded_item['subtotal'] ); - } - } - return $refunded_line_items; - } - }