This should be possible via the “customerReference” Argument (in ShipmentOrder -> ShipmentDetails of e.g. a SOAP Request to the DHL API).
From the DHL API docs:
ShipmentOrder. Shipment. ShipmentDetails.
customerReference String
maxLength: 35 Optional A reference number that the client can assign for better association purposes. Appears on shipment label.
In the meantime it would be great to have a filter on the return value of set_message() in dhl-for-woocommerce/includes/pr-dhl-api/class-pr-dhl-api-soap-label.php, e.g.:
return apply_filters('pr_shipping_dhl_label_soap_message', $this->body_request);
A filter for $dhl_label_body would work as well, before:
// Unset/remove any items that are empty strings or 0, even if required!
$this->body_request = $this->walk_recursive_remove( $dhl_label_body );
(I know the pr_shipping_dhl_label_args filter exists, but that only allows manipulation of existing args, can’t add/inject anything to the request itself).
Basically a one-liner for you Shadi without breaking anything, for my use case it’s probably enough. Wouldn’t need to hack it into the plugin itself (stays updateable).
-
This reply was modified 6 years, 2 months ago by
sim0nm. Reason: fix typo