The plugin stores the following metadata on WooCommerce orders.
| Meta Key | Type | Description |
|---|
_dpd_packages_no | int | Number of packages in the shipment |
_dpd_sender_address_id | string | ID of the sender address used for the shipment |
_dpd_data | array | Complete shipment data returned from DPD API (shipment ID, reference number, parcels) |
_dpd_parcel_shop_id | string | ID of the selected DPD parcel shop |
_dpd_parcel_shop_details | array | Detailed information about the selected parcel shop (name, address, GPS coordinates) |
_dpd_service_code | string | DPD service code for the shipment (e.g., 001, 013) |
_dpd_reference_no | string | Shipment reference number |
$order = wc_get_order( $order_id );
// Get the DPD shipment data
$dpd_data = $order->get_meta( '_dpd_data' );
// Get the tracking numbers from parcels
if ( $dpd_data && isset( $dpd_data['parcels'] ) ) {
foreach ( $dpd_data['parcels'] as $parcel ) {
$tracking_number = $parcel['parcel_no'] ?? '';
// Get parcel shop details
$parcel_shop = $order->get_meta( '_dpd_parcel_shop_details' );
$shop_name = $parcel_shop['name'] ?? '';
$shop_address = $parcel_shop['street'] ?? '';
| Code | Service |
|---|
001 | DPD CLASSIC |
013 | DPD Private |
022 | DPD 10:00 |
023 | DPD 12:00 |
010 | DPD 18:00 / GUARANTEE |
030 | DPD EXPRESS |
200 | DPD Shop2Shop (used automatically for Parcel Shop orders) |
610 | DPD Shop2Home |