WooCommerce DPD UK - Additional hooks

woocommerce_dpd_uk_label_data

woocommerce_dpd_uk_label_data - a hook which allows to create e.g. the return label after the main one was generated.

Hook documentation:

/**
* Can perform action after label received form API or modify received label.
*
* @param array $label_data Label data.
* @param WPDesk_Flexible_Shipping_Shipment_dpd_uk $shipment Shipment.
*
* @return array
*
* Label data is an array with keys:
* - content: label received from API
* - label_format
* - file_name
*
* Shipment is instance of WPDesk_Flexible_Shipping_Shipment_dpd_uk class.
* To access order use this code: $shipment->get_order();
*/

woocommerce_dpd_uk_shipment_data

woocommerce_dpd_uk_shipment_data - a hook which allows to change the collection date before sending it to DPD UK API.

Hook documentation:

/**
* Can modify shipment data before send it to API.
*
* @param array $shipment_data Shipment data.
* @param WPDesk_Flexible_Shipping_Shipment_dpd_uk $shipment Shipment.
*
* @return array
*
* Shipment data is an array with data required by API to create shipment.
*
* Shipment is instance of WPDesk_Flexible_Shipping_Shipment_dpd_uk class.
* To access order use this code: $shipment->get_order();
*/

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us