- How to check if the DPD UK service is available for specific postcode?
- DPD UK API errors
- DPD UK API error: consignment[0].totalWeight: Number not in range
- DPD UK API error: consignment[0].parcelDescription: Missing mandatory field
- DPD UK API error: consignment[0].collectionDetails.address.street: Maximum length exceeded error
- DPD UK API error: consignment.parcel.parcel Product.countryOfOrigin:
- DPD UK API error: invoice.invoiceCountryOfOrigin: Invalid string value
- DPD UK API error: consignment.parcel.parcelProduct.productHarmonisedCode: Invalid string value
- DPD UK API error: consignment[0].deliveryDetails.address.street: Maximum length exceeded
- This international shipment may include only 1 package.
- DPD UK accepts only GBP currency.
- Different Total weight value on the shipping label than in the DPD UK metabox
- Proper path for the shipping-method-after.php file
- Issue with SSL and SOAP library
How to check if the DPD UK service is available for specific postcode?
Error: ‘There are no shipping methods available…’
In some cases even after creating a new shipping method and choosing the DPD UK service which should be used for that method you may still get the There are no shipping methods available… notice in the cart or checkout after entering the specific postcode. Please mind that not all of the DPD UK services you can choose from the Service dropdown list on the shipping method configuration screen provide the 100% coverage of the UK area.
If you encounter the problem mentioned above you may have to configure the additional shipping methods using the different services to make the entire UK territory be fully covered. In other words if e.g. the Expak 1 service gives you the There are no shipping methods available… notice please add the new one using the Expak 5 or TWO DAYS service.
To make sure which DPD UK services should be available for the specific postcodes go to DPD website, enter the proper postcodes and hit the Quote & Book button:
You will be redirected to the page displaying all the available DPD UK services for sender’s – SW1A 1AA and recipient’s – B73 5BL postcodes:
DPD UK API errors
DPD UK API error: consignment[0].totalWeight: Number not in range
If you have encountered the error above while creating the shipment from the DPD UK metabox on the Order details screen probably the entered package weight is lower than 0.1 kg. DPD UK API requires it to be higher or at least equal to 0.1 kg:
To solve the problem please change the package weight to be at least 0.1 kg or higher.
DPD UK API error: consignment[0].parcelDescription: Missing mandatory field
This error is caused by the fact that DPD Europe by Road service requires filling the Parcel Description field. If you are using the DPD Europe by Road service, enter the Parcel Description to successfully create shipment. You can add it in the DPD UK metabox on the order edit page, or in the DPD UK shipping method setting to Automatically, for all orders.
DPD UK API error: consignment[0].collectionDetails.address.street: Maximum length exceeded error
This error is caused by too long address details. You can change it in the Sender details in the DPD UK plugin settings (WooCommerce > Settings > Shipping > DPD UK). The maximum length of address should be 25 characters.
DPD UK API error: consignment.parcel.parcel Product.countryOfOrigin:
Error: consignment.parcel.parcelProduct.countryOfOrigin: Product country of origin not found (parcel 1, product 1) consignment.parcel.parcel Product.countryOfOrigin: Maximum length exceeded
If you encountered the error above you probably haven’t configured the products’ Country of Manufacture product attribute properly. DPD UK API accepts only the countries’ ISO codes as the products’ Country of Manufacture attribute’s values. In other words, you should use e.g. DE, DK, SE, etc. as the attribute’s values here instead of full countries’ names (Germany, Denmark, Sweden).
If you have any difficulties with the correct setup, check how to configure them properly →
DPD UK API error: invoice.invoiceCountryOfOrigin: Invalid string value
The error above occurs most often when the Country of Origin field in the plugin settings’ Invoice details section is not filled in or its value wasn’t saved properly after the plugin update:
In order to solve this out please make sure the right country was selected there and resave the plugin settings by hitting the Save button at the bottom of the screen.
DPD UK API error: consignment.parcel.parcelProduct.productHarmonisedCode: Invalid string value
The error above is usually caused by the products’ Commodity Codes length different than 8 digits. In order to prevent this API error from happening the Commodity Codes of all the products in your shop should consist of 8 digits.
DPD UK API error: consignment[0].deliveryDetails.address.street: Maximum length exceeded
This message comes directly from DPD’a API and as it states, street in delivery address is too long.
You can change it in the Sender details (Shipment section) in the DPD UK plugin settings (WooCommerce > Settings > Shipping > DPD UK). The maximum length should be 25 characters.
This international shipment may include only 1 package.
Due to Britan’s upcoming exit from the European Union (EU) and its related regulations it is now required for all the international shipments to clearly affirm what kind of products are shipped and which package the product was placed in:
As a result the amout of international shipments was curtailed to 1 per order. The restriction aims to help you avoid any possible difficulties with the shipment’s processing in the DPD UK systems. Please feel free to contact us if you require any further information concerning this matter via the contact form at https://octolize.com/support/.
DPD UK accepts only GBP currency.
DPD UK API approves only the GBP currency values to be passed in the sent requests. In other words, in order to pass the data properly to the DPD UK systems in such case, your shop’s currency must be set to GBP as well.
Different Total weight value on the shipping label than in the DPD UK metabox
If you sell extremely light products in your shop, the Total weight field’s value you can see in the DPD UK metabox will reflect the exact summed up weight of the ordered products, e.g. 0.083 kg. However, on the generated shipping label for such order, it will be automatically rounded up to 0.1 kg if shipping domestically (UK) or within the European Union. If shipping outside EU, it will be rounded up to 0.5 kg. It’s an intended plugin’s behaviour and it is due to the minimum acceptable shipments’ weight for these destinations.
Proper path for the shipping-method-after.php file
Path: {theme-name}/woocommerce-dpd-uk/woocommerce/shipping-method-after.php
Issue with SSL and SOAP library
There might sometimes occur an issue with the SSL and SOAP, in most cases because of the server’s configuration. This issue disables the communication with API of DPD. You may encounter issue of this type:
PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://dpdservices.dpd.com.pl/DPDPackageObjServicesService/DPDPackageObjServices?WSDL' : failed to load external entity "https://dpdservices.dpd.com.pl/DPDPackageObjServicesService/DPDPackageObjServices?WSDL" in /home/admin/domains/xyzabc.pl/public_html/wp-content/plugins/woocommerce-dpd/classes/class-dpd-api.php on line 58
The solution to this issue is to add the following code to the functions.php file:
add_filter( 'woocommerce_dpd_disable_ssl_verification', '__return_true' ); add_filter( 'woocommerce_dpd_disable_cache_wsdl', '__return_true' );
Filters, which are there used, disable the verification of the SSL and WSDL cache (In the SOAP library).