• Hi. Is there any way to get the tracking number from the order via PHP or do_shortcode in the email template?

Viewing 1 replies (of 1 total)
  • Plugin Author Abdalsalaam Halawa

    (@abdalsalaam)

    Hello @donatory
    you can do it by reading the metadata :

    $order = wc_get_order( $order_id );
    $order->get_meta( '_pr_shipment_dhl_label_tracking' );
    $tracking_number = $label_tracking_info['tracking_number'] ?? '';

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.