Merge pull request #27934 from woocommerce/remove_get_product_from_item

Remove the remaining uses of $order->get_product_from_item()
This commit is contained in:
Claudio Sanches 2020-10-14 16:18:29 -03:00 committed by GitHub
commit 27e4288eab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ class WC_REST_Order_Refunds_V1_Controller extends WC_REST_Orders_V1_Controller {
// Add line items.
foreach ( $refund->get_items() as $item_id => $item ) {
$product = $refund->get_product_from_item( $item );
$product = $item->get_product();
$product_id = 0;
$variation_id = 0;
$product_sku = null;

View File

@ -173,7 +173,7 @@ class WC_REST_Orders_V1_Controller extends WC_REST_Posts_Controller {
// Add line items.
foreach ( $order->get_items() as $item_id => $item ) {
$product = $order->get_product_from_item( $item );
$product = $item->get_product();
$product_id = 0;
$variation_id = 0;
$product_sku = null;