Plugin Directory

Changeset 2552080


Ignore:
Timestamp:
06/22/2021 12:53:51 PM (5 years ago)
Author:
sprintlogistics
Message:

add SKU in description when we create waybill

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sprint/trunk/includes/Api/Callback/ERP_SPRINT_Order_Api.php

    r2541274 r2552080  
    6060    $description = '';
    6161    foreach ($items as $item_id => $item) {
    62       $description.= 'Product SKU: ' . $item->get_product_id().', ';
    63       $description.= 'Product name: ' . $item->get_name().', ';
     62      $product = wc_get_product($item->get_product_id());
     63      $description.= 'Product SKU: ' . $product->get_sku().', ';
     64      $description.= 'Pproductroduct name: ' . $item->get_name().', ';
    6465      $description.= 'Product quantity: ' . $item->get_quantity().' | ';
    6566    }
Note: See TracChangeset for help on using the changeset viewer.