What can we help you with?

How to Add an Order number on shipment label in ELEX WooCommerce DHL Shipping plugin? (Code Snippet)

The following code facilitates you to add an order number on shipment label.
Add the following code to your functions.php, or anywhere relevant.

function wf_dhl_add_customer_reference($shipment_details, $order_id) {
//Add customer reference to the shipment request
$shipment_details['customerReference'] = 'Order Number : '.$order_id;
return $shipment_details;
}
add_filter('woocommerce_dhl_paket_request', 'wf_dhl_add_customer_reference', 10, 2);

In the above code, $order_id with ‘Order Number :’ is stored in $shipment_details and function returns $shipment_details for printing it on label.

 


To explore more details about the plugins, go check out ELEX WooCommerce DHL Express / eCommerce / Paket Shipping Plugin with Print Label.

Read the article for setting up DHL Express understand the plugin, in detail. Or check out the product documentation section for more related articles.

You can also check out other WooCommerce and WordPress plugins in ELEX.

Previous How to convert Base currency to DHL currency, dynamically? (Code Snippet)
You must be logged in to post a comment.