Hooks for the DHL package bundled in Germanized.
woocommerce_gzd_dhl_parcel_locator_countries Filter
Filter to enable DHL parcel shop delivery for certain countries.
$country_codes
array Array of country codes which support DHL parcel shop delivery.
add_filter( "woocommerce_gzd_dhl_parcel_locator_countries", function( $country_codes ) { // Do something return $country_codes; }, 10, 1 );
woocommerce_gzd_dhl_parcel_locator_excluded_gateways Filter
Filter to disable DHL parcel shop delivery for certain gateways.
$gateways
array Array of gateway IDs to exclude.
add_filter( "woocommerce_gzd_dhl_parcel_locator_excluded_gateways", function( $gateways ) { // Do something return $gateways; }, 10, 1 );
woocommerce_gzd_dhl_order_postnumber Filter
Filter to adjust the DHL postnumber for a certain order.
$post_number
string The post number.$order
\WC_Order The order object.
add_filter( "woocommerce_gzd_dhl_order_postnumber", function( $post_number, $order ) { // Do something return $post_number; }, 10, 2 );
woocommerce_gzd_dhl_order_pickup_type Filter
Filter to adjust the DHL pickup type e.g. packstation for a certain order.
$pickup_type
string The pickup type.$order
\WC_Order The order object.
add_filter( "woocommerce_gzd_dhl_order_pickup_type", function( $pickup_type, $order ) { // Do something return $pickup_type; }, 10, 2 );
woocommerce_gzd_dhl_user_postnumber Filter
Filter to adjust the DHL postnumber for a certain user.
$post_number
string The post number.$user
\WP_User The user object.
add_filter( "woocommerce_gzd_dhl_user_postnumber", function( $post_number, $user ) { // Do something return $post_number; }, 10, 2 );
woocommerce_gzd_dhl_pickup_type_address_label Filter
Filter to adjust the pickup type address label added to the address field when a certain pickup type was chosen.
$pickup_type_text
string The pickup type text.$method
bool|\Vendidero\Germanized\DHL\ShippingProvider\ShippingMethod The shipping method object if available.
add_filter( "woocommerce_gzd_dhl_pickup_type_address_label", function( $pickup_type_text, $method ) { // Do something return $pickup_type_text; }, 10, 2 );
woocommerce_gzd_dhl_pickup_type_address_placeholder Filter
Filter to adjust the pickup type address placeholder added to the address field when a certain pickup type was chosen.
$pickup_type_text
string The pickup type placeholder text.$method
bool|\Vendidero\Germanized\DHL\ShippingProvider\ShippingMethod The shipping method object if available.
add_filter( "woocommerce_gzd_dhl_pickup_type_address_placeholder", function( $pickup_type_text, $method ) { // Do something return $pickup_type_text; }, 10, 2 );
woocommerce_gzd_dhl_validate_pickup_address Filter
$param_1
bool$param_2
string$param_3
string
add_filter( "woocommerce_gzd_dhl_validate_pickup_address", function( $param_1, $param_2, $param_3 ) { // Do something return $param_1; }, 10, 3 );
woocommerce_gzd_enable_packstation_deutsche_post Filter
$param
string
add_filter( "woocommerce_gzd_enable_packstation_deutsche_post", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_dhl_preferred_service_fields Action
add_action( "woocommerce_gzd_dhl_preferred_service_fields", function( ) { // Do something }, 10 );
woocommerce_gzd_dhl_return_label_api_sender_name3 Filter
By default the name3 parameter is used to transmit the additional address field to the DHL API. You may adjust the field value by using this filter.
$value
string The field value.$label
\Vendidero\Germanized\DHL\Label\ReturnLabel The label instance.
add_filter( "woocommerce_gzd_dhl_return_label_api_sender_name3", function( $value, $label ) { // Do something return $value; }, 10, 2 );
woocommerce_gzd_dhl_retoure_customs_data Filter
$param_1
array$param_2
string
add_filter( "woocommerce_gzd_dhl_retoure_customs_data", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_consider_saturday_as_working_day Filter
Filter to decide whether DHL should consider saturday as a working day for preferred day calculation or not.
$is_working_day
bool True if saturday should be considered a working day.
add_filter( "woocommerce_gzd_dhl_consider_saturday_as_working_day", function( $is_working_day ) { // Do something return $is_working_day; }, 10, 1 );
woocommerce_gzd_deutsche_post_exclude_page_format Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_deutsche_post_exclude_page_format", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_deutsche_post_label_api_before_delete Action
Action fires before deleting a Deutsche Post PDF label through an API call.
$label
\Vendidero\Germanized\DHL\Label\DeutschePost The label object.
add_action( "woocommerce_gzd_dhl_deutsche_post_label_api_before_delete", function( $label ) { // Do something }, 10, 1 );
woocommerce_gzd_dhl_deutsche_post_label_api_deleted Action
Action fires after deleting a Deutsche Post PDF label through an API call.
$label
\Vendidero\Germanized\DHL\Label\DeutschePost The label object.
add_action( "woocommerce_gzd_dhl_deutsche_post_label_api_deleted", function( $label ) { // Do something }, 10, 1 );
woocommerce_gzd_deutsche_post_label_api_position_x Filter
Adjust the Deutsche Post (Internetmarke) label print X position.
$x
mixed The x axis position.$label
\Vendidero\Germanized\DHL\Label\DeutschePost The label instance.$shipment
\Vendidero\Germanized\Shipments\Shipment The shipment instance.
add_filter( "woocommerce_gzd_deutsche_post_label_api_position_x", function( $x, $label, $shipment ) { // Do something return $x; }, 10, 3 );
woocommerce_gzd_deutsche_post_label_api_position_y Filter
Adjust the Deutsche Post (Internetmarke) label print Y position.
$y
mixed The y axis position.$label
\Vendidero\Germanized\DHL\Label\DeutschePost The label instance.$shipment
\Vendidero\Germanized\Shipments\Shipment The shipment instance.
add_filter( "woocommerce_gzd_deutsche_post_label_api_position_y", function( $y, $label, $shipment ) { // Do something return $y; }, 10, 3 );
woocommerce_gzd_deutsche_post_label_api_page_number Filter
$param_1
numeric$param_2
string$param_3
string
add_filter( "woocommerce_gzd_deutsche_post_label_api_page_number", function( $param_1, $param_2, $param_3 ) { // Do something return $param_1; }, 10, 3 );
woocommerce_gzd_deutsche_post_label_api_customs_shipment_service_level Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_deutsche_post_label_api_customs_shipment_service_level", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_deutsche_post_label_api_customs_shipment_nature_type Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_deutsche_post_label_api_customs_shipment_nature_type", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_deutsche_post_label_api_customs_transmit_communication_data Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_deutsche_post_label_api_customs_transmit_communication_data", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_deutsche_post_label_api_pdf_accept_header Filter
$param
string
add_filter( "woocommerce_gzd_deutsche_post_label_api_pdf_accept_header", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_dhl_label_api_insurance_amount Filter
$param_1
string$param_2
string$param_3
string
add_filter( "woocommerce_gzd_dhl_label_api_insurance_amount", function( $param_1, $param_2, $param_3 ) { // Do something return $param_1; }, 10, 3 );
woocommerce_gzd_dhl_label_api_shipper_reference Filter
This filter allows using a ShipperReference configured in the GKP instead of transmitting the shipper data from the DHL settings. Use this filter carefully and make sure that the reference exists.
$shipper_reference
string The shipper reference from the GKP.$label
\Vendidero\Germanized\DHL\Label\DHL The label instance.
add_filter( "woocommerce_gzd_dhl_label_api_shipper_reference", function( $shipper_reference, $label ) { // Do something return $shipper_reference; }, 10, 2 );
woocommerce_gzd_dhl_label_api_shipper_name1 Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_api_shipper_name1", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_api_shipper_name2 Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_api_shipper_name2", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_api_shipper_name3 Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_api_shipper_name3", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_api_shipper_street Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_api_shipper_street", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_api_shipper_zip Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_api_shipper_zip", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_api_shipper_city Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_api_shipper_city", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_api_shipper_email Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_api_shipper_email", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_api_shipper_country Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_api_shipper_country", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_api_receiver_name3 Filter
By default the name3 parameter is used to transmit the additional address field to the DHL API. You may adjust the field value by using this filter.
$value
string The field value.$label
\Vendidero\Germanized\DHL\Label\DHL The label instance.
add_filter( "woocommerce_gzd_dhl_label_api_receiver_name3", function( $value, $label ) { // Do something return $value; }, 10, 2 );
woocommerce_gzd_dhl_label_api_communication_contact_person Filter
Choose whether to transmit the full name of the shipment receiver as contactPerson while creating a label.
$name
string The name of the shipmen receiver.$label
\Vendidero\Germanized\DHL\Label\DHL The label instance.
add_filter( "woocommerce_gzd_dhl_label_api_communication_contact_person", function( $name, $label ) { // Do something return $name; }, 10, 2 );
woocommerce_gzd_dhl_label_api_communication_phone Filter
Choose whether to transfer the phone number to DHL on creating a label. By default the phone number is not transmitted.
$phone
string The phone number.$label
\Vendidero\Germanized\DHL\Label\DHL The label instance.
add_filter( "woocommerce_gzd_dhl_label_api_communication_phone", function( $phone, $label ) { // Do something return $phone; }, 10, 2 );
woocommerce_gzd_dhl_label_api_communication_email Filter
Choose whether to transfer the email to DHL on creating a label. By default the email is only transmitted if the customer opted in. This email address is not used to notify the customer via DHL. It is only meant for communicaton purposes.
$email
string The email.$label
\Vendidero\Germanized\DHL\Label\DHL The label instance.
add_filter( "woocommerce_gzd_dhl_label_api_communication_email", function( $email, $label ) { // Do something return $email; }, 10, 2 );
woocommerce_gzd_dhl_label_api_export_invoice_number Filter
Filter to allow adjusting the export invoice number.
$invoice_number
string The invoice number.$label
\Vendidero\Germanized\DHL\Label\Label The label instance.
add_filter( "woocommerce_gzd_dhl_label_api_export_invoice_number", function( $invoice_number, $label ) { // Do something return $invoice_number; }, 10, 2 );
woocommerce_gzd_dhl_label_rest_api_customs_data Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_rest_api_customs_data", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_rest_api_create_label_request Filter
$param_1
string$param_2
string$param_3
string$param_4
string
add_filter( "woocommerce_gzd_dhl_label_rest_api_create_label_request", function( $param_1, $param_2, $param_3, $param_4 ) { // Do something return $param_1; }, 10, 4 );
woocommerce_gzd_dhl_label_api_export_type Filter
Filter to allow adjusting the export type of a DHL label (for customs). Could be:
- OTHER
- PRESENT
- COMMERCIAL_SAMPLE
- DOCUMENT
- RETURN_OF_GOODS
- COMMERCIAL_GOODS
$export_type
string The export type.$label
\Vendidero\Germanized\DHL\Label\Label The label instance.
add_filter( "woocommerce_gzd_dhl_label_api_export_type", function( $export_type, $label ) { // Do something return $export_type; }, 10, 2 );
woocommerce_gzd_dhl_label_api_deleted Action
Action fires after deleting a DHL PDF label through an API call.
$label
\Vendidero\Germanized\DHL\Label\DHL The label object.
add_action( "woocommerce_gzd_dhl_label_api_deleted", function( $label ) { // Do something }, 10, 1 );
woocommerce_gzd_dhl_label_api_enable_notification Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_api_enable_notification", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_api_province Filter
The province field actually prints the state on the DHL label.
$value
string The field value.$label
\Vendidero\Germanized\DHL\Label\DHL The label instance.
add_filter( "woocommerce_gzd_dhl_label_api_province", function( $value, $label ) { // Do something return $value; }, 10, 2 );
woocommerce_gzd_dhl_label_api_shipper_street_number Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_api_shipper_street_number", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_api_shipper_street_name Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_api_shipper_street_name", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_api_shipper_phone Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_api_shipper_phone", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_api_shipper_state Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_api_shipper_state", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_api_customs_data Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_dhl_label_api_customs_data", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_dhl_label_api_create_label_request Filter
$param_1
string$param_2
string$param_3
string$param_4
string
add_filter( "woocommerce_gzd_dhl_label_api_create_label_request", function( $param_1, $param_2, $param_3, $param_4 ) { // Do something return $param_1; }, 10, 4 );