• Germanized
  • Hooks

Shipments

woocommerce_gzd_shipments_after_pickup_location_choose_notice Action

  1. $param string
add_action( "woocommerce_gzd_shipments_after_pickup_location_choose_notice", function( $param ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipments_current_pickup_location_field_rendered Action

add_action( "woocommerce_gzd_shipments_current_pickup_location_field_rendered", function(  ) {
    // Do something
        
}, 10 );

woocommerce_gzd_shipments_enable_pickup_delivery Filter

  1. $param bool
add_filter( "woocommerce_gzd_shipments_enable_pickup_delivery", function( $param ) {
    // Do something
    return $param;    
}, 10, 1 );

woocommerce_gzd_shipments_pickup_delivery_available Filter

  1. $param string
add_filter( "woocommerce_gzd_shipments_pickup_delivery_available", function( $param ) {
    // Do something
    return $param;    
}, 10, 1 );

woocommerce_gzd_shipments_render_current_pickup_location_in_billing Filter

  1. $param string
add_filter( "woocommerce_gzd_shipments_render_current_pickup_location_in_billing", function( $param ) {
    // Do something
    return $param;    
}, 10, 1 );

woocommerce_gzd_shipment_customer_pickup_location_customer_number Filter

  1. $param_1 string
  2. $param_2 string
add_filter( "woocommerce_gzd_shipment_customer_pickup_location_customer_number", function( $param_1, $param_2 ) {
    // Do something
    return $param_1;    
}, 10, 2 );

woocommerce_gzd_shipment_pickup_location_delivery_available_for_customer Filter

  1. $param_1 string
  2. $param_2 string
add_filter( "woocommerce_gzd_shipment_pickup_location_delivery_available_for_customer", function( $param_1, $param_2 ) {
    // Do something
    return $param_1;    
}, 10, 2 );

woocommerce_gzd_shipment_customer_pickup_location_code Filter

  1. $param_1 string
  2. $param_2 string
add_filter( "woocommerce_gzd_shipment_customer_pickup_location_code", function( $param_1, $param_2 ) {
    // Do something
    return $param_1;    
}, 10, 2 );

woocommerce_gzd_shipments_order_completed_status Filter

  1. $param_1 string
  2. $param_2 string
add_filter( "woocommerce_gzd_shipments_order_completed_status", function( $param_1, $param_2 ) {
    // Do something
    return $param_1;    
}, 10, 2 );

woocommerce_gzd_shipment_order_mark_as_completed Filter

  1. $param_1 string
  2. $param_2 string
add_filter( "woocommerce_gzd_shipment_order_mark_as_completed", function( $param_1, $param_2 ) {
    // Do something
    return $param_1;    
}, 10, 2 );

woocommerce_gzd_shipment_order_completed_status Filter

  1. $param_1 string
  2. $param_2 string
add_filter( "woocommerce_gzd_shipment_order_completed_status", function( $param_1, $param_2 ) {
    // Do something
    return $param_1;    
}, 10, 2 );

woocommerce_gzd_auto_create_shipments_for_order Filter

  1. $param_1 bool
  2. $param_2 string
  3. $param_3 string
add_filter( "woocommerce_gzd_auto_create_shipments_for_order", function( $param_1, $param_2, $param_3 ) {
    // Do something
    return $param_1;    
}, 10, 3 );

woocommerce_gzd_before_auto_create_shipments_for_order Action

  1. $param_1 string
  2. $param_2 string
  3. $param_3 string
add_action( "woocommerce_gzd_before_auto_create_shipments_for_order", function( $param_1, $param_2, $param_3 ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_after_auto_create_shipments_for_order Action

  1. $param_1 string
  2. $param_2 string
  3. $param_3 string
  4. $param_4 string
add_action( "woocommerce_gzd_after_auto_create_shipments_for_order", function( $param_1, $param_2, $param_3, $param_4 ) {
    // Do something
        
}, 10, 4 );

woocommerce_gzd_shipments_disable_label_auto_generate Filter

Filter that allows to disable automatically creating DHL labels for a certain shipment.

  1. $disable bool True if you want to disable automation.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_shipments_disable_label_auto_generate", function( $disable, $shipment ) {
    // Do something
    return $disable;    
}, 10, 2 );

woocommerce_gzd_shipments_order_has_voucher Filter

  1. $param_1 bool
  2. $param_2 string
add_filter( "woocommerce_gzd_shipments_order_has_voucher", function( $param_1, $param_2 ) {
    // Do something
    return $param_1;    
}, 10, 2 );

woocommerce_gzd_shipments_customs_use_subtotal Filter

  1. $param_1 string
  2. $param_2 string
add_filter( "woocommerce_gzd_shipments_customs_use_subtotal", function( $param_1, $param_2 ) {
    // Do something
    return $param_1;    
}, 10, 2 );

woocommerce_gzd_shipments_label_customs_data Filter

  1. $param_1 string
  2. $param_2 string
  3. $param_3 string
  4. $param_4 string
add_filter( "woocommerce_gzd_shipments_label_customs_data", function( $param_1, $param_2, $param_3, $param_4 ) {
    // Do something
    return $param_1;    
}, 10, 4 );

woocommerce_gzd_shipment_label_shipping_provider_name Filter

  1. $param_1 string
  2. $param_2 string
  3. $param_3 string
add_filter( "woocommerce_gzd_shipment_label_shipping_provider_name", function( $param_1, $param_2, $param_3 ) {
    // Do something
    return $param_1;    
}, 10, 3 );

woocommerce_gzd_shipment_label_class Filter

Filter that allows adjusting the default DHL label classname.

  1. $classname string The classname to be used.
  2. $label_id int The label id.
  3. $label_type string The label type.
  4. $param_4 string
add_filter( "woocommerce_gzd_shipment_label_class", function( $classname, $label_id, $label_type, $param_4 ) {
    // Do something
    return $classname;    
}, 10, 4 );

woocommerce_gzd_shipment_label_query_args Filter

Filter to adjust query paramaters for a DHL label query.

  1. $query_vars array The query arguments.
add_filter( "woocommerce_gzd_shipment_label_query_args", function( $query_vars ) {
    // Do something
    return $query_vars;    
}, 10, 1 );

woocommerce_gzd_shipment_label_query Filter

Filter to adjust query result data for a DHL label query.

  1. $results \Vendidero\Germanized\Shipments\Labels\Label[] The results.
  2. $args array The query arguments.
add_filter( "woocommerce_gzd_shipment_label_query", function( $results, $args ) {
    // Do something
    return $results;    
}, 10, 2 );

woocommerce_gzd_shipment_label_search_columns Filter

Filters the columns to search in a DHL LabelQuery search. The default columns depend on the search term, and include ‚label_id‘, ‚label_shipment_id‘, ‚label_path‘ and ‚label_number‘.

  1. $search_columns string[] Array of column names to be searched.
  2. $search string Text being searched.
  3. $this \Vendidero\Germanized\Shipments\Labels\LabelQuery The current LabelQuery instance.
add_filter( "woocommerce_gzd_shipment_label_search_columns", function( $search_columns, $search, $this ) {
    // Do something
    return $search_columns;    
}, 10, 3 );

woocommerce_gzd_shipments_encryption_key_constant Filter

  1. $param_1 string
  2. $param_2 string
add_filter( "woocommerce_gzd_shipments_encryption_key_constant", function( $param_1, $param_2 ) {
    // Do something
    return $param_1;    
}, 10, 2 );

woocommerce_gzd_shipments_encryption_enable_logging Filter

  1. $param string
add_filter( "woocommerce_gzd_shipments_encryption_enable_logging", function( $param ) {
    // Do something
    return $param;    
}, 10, 1 );

woocommerce_gzd_shipments_encryption_log_context Filter

  1. $param string
add_filter( "woocommerce_gzd_shipments_encryption_log_context", function( $param ) {
    // Do something
    return $param;    
}, 10, 1 );

woocommerce_gzd_shipment_sync_props Filter

Filter to allow adjusting the shipment props synced from the corresponding order.

  1. $args mixed The properties in key => value pairs.
  2. $shipment \Vendidero\Germanized\Shipments\SimpleShipment The shipment object.
  3. $order_shipment \Vendidero\Germanized\Shipments\Order The shipment order object.
add_filter( "woocommerce_gzd_shipment_sync_props", function( $args, $shipment, $order_shipment ) {
    // Do something
    return $args;    
}, 10, 3 );

woocommerce_gzd_shipment_synced Action

Action that fires after a shipment has been synced. Syncing is used to keep the shipment in sync with the corresponding order.

  1. $shipment \Vendidero\Germanized\Shipments\SimpleShipment The shipment object.
  2. $order_shipment \Vendidero\Germanized\Shipments\Order The shipment order object.
  3. $args array Array containing properties in key => value pairs to be updated.
add_action( "woocommerce_gzd_shipment_synced", function( $shipment, $order_shipment, $args ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_shipment_items_synced Action

Action that fires after items of a shipment have been synced.

  1. $shipment \Vendidero\Germanized\Shipments\SimpleShipment The shipment object.
  2. $order_shipment \Vendidero\Germanized\Shipments\Order The shipment order object.
  3. $args array Array containing additional data e.g. items.
add_action( "woocommerce_gzd_shipment_items_synced", function( $shipment, $order_shipment, $args ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_shipping_providers_init Action

This action fires as soon as the shipping provider wrapper instance is loaded.

add_action( "woocommerce_gzd_shipping_providers_init", function(  ) {
    // Do something
        
}, 10 );

woocommerce_gzd_shipping_provider_class_name Filter

  1. $param_1 string
  2. $param_2 string
  3. $param_3 string
add_filter( "woocommerce_gzd_shipping_provider_class_name", function( $param_1, $param_2, $param_3 ) {
    // Do something
    return $param_1;    
}, 10, 3 );

woocommerce_gzd_shipping_provider_class_names Filter

This filter may be used to register additional shipping providers by adding a unique name as key and the classname to be loaded as value of the array.

  1. $shipping_providers array The shipping provider array
add_filter( "woocommerce_gzd_shipping_provider_class_names", function( $shipping_providers ) {
    // Do something
    return $shipping_providers;    
}, 10, 1 );

woocommerce_gzd_load_shipping_providers Action

This hook fires as soon as shipping providers are loaded. Additional shipping provider may be registered manually afterwards.

  1. $providers \Vendidero\Germanized\Shipments\ShippingProvider\Helper The shipping providers instance
add_action( "woocommerce_gzd_load_shipping_providers", function( $providers ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipments_max_api_retries Filter

  1. $param numeric
add_filter( "woocommerce_gzd_shipments_max_api_retries", function( $param ) {
    // Do something
    return $param;    
}, 10, 1 );

woocommerce_gzd_shipping_provider_activated Action

This action fires as soon as a certain shipping provider gets activated.

  1. $shipping_provider \Vendidero\Germanized\Shipments\Interfaces\ShippingProvider The shipping provider instance.
add_action( "woocommerce_gzd_shipping_provider_activated", function( $shipping_provider ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipping_provider_deactivated Action

This action fires as soon as a certain shipping provider gets deactivated.

  1. $shipping_provider \Vendidero\Germanized\Shipments\Interfaces\ShippingProvider The shipping provider instance.
add_action( "woocommerce_gzd_shipping_provider_deactivated", function( $shipping_provider ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipment_item_synced Action

Action that fires after a shipment item has been synced. Syncing is used to keep the shipment item in sync with the corresponding order item or parent shipment item.

  1. $item \WC_Order_Item|\Vendidero\Germanized\Shipments\ShipmentItem The order item object or parent shipment item.
  2. $args array Array containing props in key => value pairs which have been updated.
  3. $param_3 string
add_action( "woocommerce_gzd_shipment_item_synced", function( $item, $args, $param_3 ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_shipment_has_status Filter

Filter to decide whether a Shipment has a certain status or not.

  1. $has_status bool Whether the Shipment has a status or not.
  2. $this \Vendidero\Germanized\Shipments\Shipment The shipment object.
  3. $status string The status to be checked against.
add_filter( "woocommerce_gzd_shipment_has_status", function( $has_status, $this, $status ) {
    // Do something
    return $has_status;    
}, 10, 3 );

woocommerce_gzd_get_shipment_address_street_number Filter

Filter to adjust the shipment address street number.

  1. $number string The shipment address street number.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_get_shipment_address_street_number", function( $number, $shipment ) {
    // Do something
    return $number;    
}, 10, 2 );

woocommerce_gzd_get_shipment_address_street Filter

Filter to adjust the shipment address street.

  1. $street string The shipment address street without street number.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_get_shipment_address_street", function( $street, $shipment ) {
    // Do something
    return $street;    
}, 10, 2 );

woocommerce_gzd_get_shipment_address_street_addition Filter

Filter to adjust the shipment address street addition.

  1. $addition string The shipment address street addition e.g. EG14.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_get_shipment_address_street_addition", function( $addition, $shipment ) {
    // Do something
    return $addition;    
}, 10, 2 );

woocommerce_gzd_get_shipment_address_street_addition_2 Filter

Filter to adjust the shipment address street addition.

  1. $addition string The shipment address street addition e.g. EG14.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_get_shipment_address_street_addition_2", function( $addition, $shipment ) {
    // Do something
    return $addition;    
}, 10, 2 );

woocommerce_gzd_shipment_send_to_external_pickup Filter

Filter to decide whether a Shipment is to be sent to a external pickup location e.g. packstation.

  1. $external bool True if the Shipment goes to a pickup location.
  2. $types array Array containing the types to be checked against, or empty.
  3. $this \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_shipment_send_to_external_pickup", function( $external, $types, $this ) {
    // Do something
    return $external;    
}, 10, 3 );

woocommerce_gzd_shipment_is_editable Filter

Filter to dedice whether the current Shipment is still editable or not.

  1. $is_editable bool Whether the Shipment is editable or not.
  2. $this \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_shipment_is_editable", function( $is_editable, $this ) {
    // Do something
    return $is_editable;    
}, 10, 2 );

woocommerce_gzd_shipment_edit_status Action

Action that fires after a shipment bulk status update has been processed.

  1. $shipment_id int The shipment id.
  2. $new_status string The new shipment status.
add_action( "woocommerce_gzd_shipment_edit_status", function( $shipment_id, $new_status ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_shipment_before_status_change Action

Action that fires before a shipment status transition happens.

  1. $shipment_id int The shipment id.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
  3. $status_transition array The status transition data.
add_action( "woocommerce_gzd_shipment_before_status_change", function( $shipment_id, $shipment, $status_transition ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_shipment_status_changed Action

Action that indicates shipment status change.

  1. $shipment_id int The shipment id.
  2. $status_from string The old shipment status.
  3. $status_to string The new shipment status.
  4. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_action( "woocommerce_gzd_shipment_status_changed", function( $shipment_id, $status_from, $status_to, $shipment ) {
    // Do something
        
}, 10, 4 );

woocommerce_gzd_shipment_contains_order_item Filter

Filter to adjust whether a Shipment contains a specific order item or not.

  1. $contains bool Whether the Shipment contains the order item or not.
  2. $order_item_id int[] The order item id(s).
  3. $this \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_shipment_contains_order_item", function( $contains, $order_item_id, $this ) {
    // Do something
    return $contains;    
}, 10, 3 );

woocommerce_gzd_{$hook_postfix}shipment_after_save Action

Trigger action after saving shipment to the DB. The dynamic portion of this hook, `$hook_postfix` is used to construct a unique hook for a shipment type. Example hook name: woocommerce_gzd_shipment_after_save

  1. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object being saved.
  2. $is_new bool Indicator to determine whether this is a new shipment or not.

woocommerce_gzd_shipment_query_args Filter

Filter to adjust query arguments passed to a Shipment query.

  1. $args array The arguments passed.
add_filter( "woocommerce_gzd_shipment_query_args", function( $args ) {
    // Do something
    return $args;    
}, 10, 1 );

woocommerce_gzd_shipment_query Filter

Filter to adjust the Shipment query result.

  1. $results \Vendidero\Germanized\Shipments\Shipment[] Shipment results.
  2. $args array The arguments passed.
add_filter( "woocommerce_gzd_shipment_query", function( $results, $args ) {
    // Do something
    return $results;    
}, 10, 2 );