• Resolved JapeNZ

    (@japenz)


    Hi there,
    Is it possible using a function or something that I can overwrite the following:

    function get_item_status($item_id, $item, $order){
    $icon = '';
    $order_id = $item->get_order_id();
    $rows = $this->get_wxp_shipment_data($order_id);
    $product = $item->get_product();
    if(is_a($product,'WC_Product') && is_array($rows) && !empty($rows) && !$product->is_virtual()){
    foreach($rows as $row){
    if(isset($row['item_id']) && $row['item_id']==$item_id){
    if(isset($row['status']) && $row['status']=='shipped'){
    $icon = ('Shipped','wxp-partial-shipment').' X '.$row['shipped']; } elseif(isset($row['status']) && $row['status']=='partially-shipped'){ $icon = ('Partially Shipped','wxp-partial-shipment').' X '.$row['shipped'];
    }
    elseif(isset($row['status']) && $row['status']=='not-shipped'){
    $icon = __('Not Shipped','wxp-partial-shipment').' X '.$row['qty'];
    }
    break;
    }
    }
    }
    return $icon;
    }

    I’d like to alter how the Status column displays the partially shipped status in customer emails, and this seems like the function that sets that.

    Also in the email details file wc-partial-shipment/emails/email-partial-order-details.php , the ‘Status’ column title is labelled ‘status’ without the capital S, just thought you might like to know ??

    Thanks for your help!

    • This topic was modified 5 months, 3 weeks ago by JapeNZ.
  • You must be logged in to reply to this topic.