• Germanized
  • Hooks

Shipments

woocommerce_gzd_{$hook_postfix}shipment_updated Action

Action that indicates that a Shipment has been updated in the DB. The dynamic portion of this hook, `$hook_postfix` refers to the shipment type in case it is not a simple shipment.

  1. $shipment_id int The shipment id.
  2. $shipment \Vendidero\Germanized\Shipments\DataStores\Shipment The shipment instance.

woocommerce_gzd_{$hook_postfix}shipment_deleted Action

Action that indicates that a Shipment has been deleted from the DB. The dynamic portion of this hook, `$hook_postfix` refers to the shipment type in case it is not a simple shipment.

  1. $shipment_id int The shipment id.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.

woocommerce_gzd_{$hook_postfix}shipment_loaded Action

Action that indicates that a Shipment has been loaded from DB. The dynamic portion of this hook, `$hook_postfix` refers to the shipment type in case it is not a simple shipment.

  1. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.

woocommerce_gzd_shipment_object_updated_props Action

Action that fires after updating a Shipment’s properties.

  1. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
  2. $changed_props array The updated properties.
add_action( "woocommerce_gzd_shipment_object_updated_props", function( $shipment, $changed_props ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_shipping_data_store_get_shipments_query Filter

Filter to adjust Shipments query arguments after parsing.

  1. $wp_query_args array Array containing parsed query arguments.
  2. $query_vars array The original query arguments.
  3. $data_store \Vendidero\Germanized\Shipments\DataStores\Shipment The shipment data store object.
add_filter( "woocommerce_gzd_shipping_data_store_get_shipments_query", function( $wp_query_args, $query_vars, $data_store ) {
    // Do something
    return $wp_query_args;    
}, 10, 3 );

woocommerce_gzd_new_shipping_provider Action

Action that indicates that a new Shipping Provider has been created in the DB.

  1. $provider_id int The provider id.
  2. $shipping_provider \Vendidero\Germanized\Shipments\ShippingProvider\Simple The shipping provider instance.
add_action( "woocommerce_gzd_new_shipping_provider", function( $provider_id, $shipping_provider ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_shipments_shipping_provider_is_manual_creation_request Filter

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

woocommerce_gzd_shipments_shipping_provider_is_reserved_name Filter

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

woocommerce_gzd_shipping_provider_updated Action

Action that indicates that a shipping provider has been updated in the DB.

  1. $shipping_provider_id int The shipping provider id.
  2. $shipping_provider \Vendidero\Germanized\Shipments\ShippingProvider\Simple The shipping provider instance.
add_action( "woocommerce_gzd_shipping_provider_updated", function( $shipping_provider_id, $shipping_provider ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_shipping_provider_deleted Action

Action that indicates that a shipping provider has been deleted from the DB.

  1. $shipping_provider_id int The shipping provider id.
  2. $provider \Vendidero\Germanized\Shipments\ShippingProvider\Simple The shipping provider object.
add_action( "woocommerce_gzd_shipping_provider_deleted", function( $shipping_provider_id, $provider ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_shipping_provider_loaded Action

Action that indicates that a shipping provider has been loaded from DB.

  1. $provider \Vendidero\Germanized\Shipments\ShippingProvider\Simple The shipping provider object.
add_action( "woocommerce_gzd_shipping_provider_loaded", function( $provider ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipping_provider_object_updated_props Action

Action that fires after updating a shipping providers’ properties.

  1. $provider \Vendidero\Germanized\Shipments\ShippingProvider\Simple The shipping provider object.
  2. $changed_props array The updated properties.
add_action( "woocommerce_gzd_shipping_provider_object_updated_props", function( $provider, $changed_props ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_shipment_{$hook_postfix}label_created Action

Action fires when a new DHL label has been created. The dynamic portion of this hook, `$hook_postfix` refers to the label type e.g. return in case it is not a simple label.

  1. $label_id int The label id.
  2. $label \Vendidero\Germanized\Shipments\DataStores\Label The label instance.

woocommerce_gzd_shipment_{$hook_postfix}label_updated Action

Action fires after a DHL label has been updated in the DB. The dynamic portion of this hook, `$hook_postfix` refers to the label type e.g. return in case it is not a simple label.

  1. $label_id int The label id.
  2. $label \Vendidero\Germanized\Shipments\DataStores\Label The label instance.
  3. $changed_props array Properties that have been changed.

woocommerce_gzd_shipment_{$hook_postfix}label_deleted Action

Action fires after a DHL label has been deleted from DB. The dynamic portion of this hook, `$hook_postfix` refers to the label type e.g. return in case it is not a simple label.

  1. $label_id int The label id.
  2. $label \Vendidero\Germanized\DHL\Label The label object.

woocommerce_gzd_shipment_{$hook_postfix}label_loaded Action

Action fires after reading a DHL label from DB. The dynamic portion of this hook, `$hook_postfix` refers to the label type e.g. return in case it is not a simple label.

  1. $label \Vendidero\Germanized\Shipments\Labels\Label The label object.

woocommerce_gzd_shipment_label_object_updated_props Action

Action fires after DHL label meta properties have been updated.

  1. $label \Vendidero\Germanized\Shipments\Labels\Label The label object.
  2. $updated_props array The updated properties.
add_action( "woocommerce_gzd_shipment_label_object_updated_props", function( $label, $updated_props ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_shipment_label_data_store_get_labels_query Filter

Filter to adjust the DHL label query args after parsing them.

  1. $wp_query_args array Parsed query arguments.
  2. $query_vars array Original query arguments.
  3. $data_store \Vendidero\Germanized\Shipments\DataStores\Label The label data store.
add_filter( "woocommerce_gzd_shipment_label_data_store_get_labels_query", function( $wp_query_args, $query_vars, $data_store ) {
    // Do something
    return $wp_query_args;    
}, 10, 3 );

woocommerce_gzd_new_shipment_item Action

Action that indicates that a new ShipmentItem has been created in the DB.

  1. $shipment_item_id int The shipment item id.
  2. $item \Vendidero\Germanized\Shipments\ShipmentItem The shipment item object.
  3. $shipment_id int The shipment id.
add_action( "woocommerce_gzd_new_shipment_item", function( $shipment_item_id, $item, $shipment_id ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_shipment_item_updated Action

Action that indicates that a ShipmentItem has been updated in the DB.

  1. $shipment_item_id int The shipment item id.
  2. $item \Vendidero\Germanized\Shipments\ShipmentItem The shipment item object.
  3. $shipment_id int The shipment id.
add_action( "woocommerce_gzd_shipment_item_updated", function( $shipment_item_id, $item, $shipment_id ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_before_delete_shipment_item Action

Action that fires before deleting a ShipmentItem from the DB.

  1. $shipment_item_id int The shipment item id.
add_action( "woocommerce_gzd_before_delete_shipment_item", function( $shipment_item_id ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_delete_shipment_item Action

Action that indicates that a ShipmentItem has been deleted from the DB.

  1. $shipment_item_id int The shipment item id.
  2. $item \Vendidero\Germanized\Shipments\ShipmentItem The shipment item object.
add_action( "woocommerce_gzd_delete_shipment_item", function( $shipment_item_id, $item ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_shipment_item_object_updated_props Action

Action that fires after updating a ShipmentItem’s properties.

  1. $item \Vendidero\Germanized\Shipments\ShipmentItem The shipment item object.
  2. $changed_props array The updated properties.
add_action( "woocommerce_gzd_shipment_item_object_updated_props", function( $item, $changed_props ) {
    // Do something
        
}, 10, 2 );

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_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 );

woocommerce_gzd_shipment_search_columns Filter

Filters the columns to search in a ShipmentQuery search. The default columns depend on the search term, and include ‘shipment_id’, ‘shipment_country’, ‘shipment_tracking_id’, ‘shipment_order_id’, ‘shipment_shipping_provider’ and ‘shipment_shipping_method’.

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

woocommerce_gzd_shipment_class Filter

Filter to adjust the classname used to construct a Shipment.

  1. $clasname string The classname to be used.
  2. $shipment_id int The shipment id.
  3. $shipment_type string The shipment type.
add_filter( "woocommerce_gzd_shipment_class", function( $clasname, $shipment_id, $shipment_type ) {
    // Do something
    return $clasname;    
}, 10, 3 );

woocommerce_gzd_shipments_embed_shipment_details_in_notification Filter

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

woocommerce_gzd_shipment_label_admin_field_$postfix Action

  1. $param_1 string
  2. $param_2 string

woocommerce_gzd_shipments_bulk_action Filter

Filter to decide whether a Shipment has changed during bulk action or not.

  1. $changed bool Whether the Shipment has changed or not.
  2. $action string The bulk action
  3. $redirect_to string The redirect URL.
  4. $table \Vendidero\Germanized\Shipments\Admin\Table The table instance.
  5. $param_5 string
add_filter( "woocommerce_gzd_shipments_bulk_action", function( $changed, $action, $redirect_to, $table, $param_5 ) {
    // Do something
    return $changed;    
}, 10, 5 );

woocommerce_gzd_admin_shipment_date_format Filter

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

woocommerce_gzd_shipment_labels_bulk_filename Filter

Filter to adjust the default filename chosen for bulk exporting shipment labels.

  1. $filename string The filename.
  2. $this \Vendidero\Germanized\Shipments\Admin\BulkLabel The `BulkLabel instance.
add_filter( "woocommerce_gzd_shipment_labels_bulk_filename", function( $filename, $this ) {
    // Do something
    return $filename;    
}, 10, 2 );

woocommerce_gzd_shipments_product_options Action

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

woocommerce_gzd_shipments_remove_legacy_customs_meta Filter

Remove legacy data upon saving in case it is not transmitted (e.g. DHL standalone plugin).

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

woocommerce_gzd_shipments_save_product_options Action

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

woocommerce_gzd_shipments_include_requested_return_count_in_menu Filter

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

woocommerce_gzd_shipments_meta_box_shipment_item_columns Filter

Filter to adjust shipment item columns shown in admin view.

  1. $item_columns array The columns available.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment.
add_filter( "woocommerce_gzd_shipments_meta_box_shipment_item_columns", function( $item_columns, $shipment ) {
    // Do something
    return $item_columns;    
}, 10, 2 );

woocommerce_gzd_shipments_table_bulk_action_handlers Filter

Filter to register new BulkActionHandler for certain Shipment bulk actions.

  1. $handlers array Array containing key => classname.
add_filter( "woocommerce_gzd_shipments_table_bulk_action_handlers", function( $handlers ) {
    // Do something
    return $handlers;    
}, 10, 1 );

woocommerce_gzd_shipment_admin_provider_list Filter

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

woocommerce_gzd_shipment_order_shipping_status Filter

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

woocommerce_gzd_shipment_order_return_default_shipping_provider Filter

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

woocommerce_gzd_shipment_order_keep_non_order_item Filter

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

woocommerce_gzd_shipment_order_item_quantity_left_for_shipping Filter

Filter to adjust the quantity left for shipment of a specific order item.

  1. $quantity_left int The quantity left for shipment.
  2. $order_item \WC_Order_Item The order item object.
  3. $this \Vendidero\Germanized\Shipments\Order The shipment order object.
add_filter( "woocommerce_gzd_shipment_order_item_quantity_left_for_shipping", function( $quantity_left, $order_item, $this ) {
    // Do something
    return $quantity_left;    
}, 10, 3 );

woocommerce_gzd_shipment_order_item_quantity_left_for_returning Filter

Filter to adjust the quantity left for returning of a specific order item.

  1. $quantity_left int The quantity left for shipment.
  2. $order_item_id int The order item id.
  3. $this \Vendidero\Germanized\Shipments\Order The shipment order object.
add_filter( "woocommerce_gzd_shipment_order_item_quantity_left_for_returning", function( $quantity_left, $order_item_id, $this ) {
    // Do something
    return $quantity_left;    
}, 10, 3 );

woocommerce_gzd_shipment_order_items_to_pack_left_for_shipping Filter

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

woocommerce_gzd_shipment_order_item_needs_shipping Filter

Filter to decide whether an order item needs shipping or not.

  1. $needs_shipping bool Whether the item needs shipping or not.
  2. $item \WC_Order_Item The order item object.
  3. $args array Additional arguments to be considered.
  4. $order \Vendidero\Germanized\Shipments\Order The shipment order object.
add_filter( "woocommerce_gzd_shipment_order_item_needs_shipping", function( $needs_shipping, $item, $args, $order ) {
    // Do something
    return $needs_shipping;    
}, 10, 4 );

woocommerce_gzd_shipment_item_needs_return Filter

Filter to decide whether a shipment item needs return or not.

  1. $needs_return bool Whether the item needs return or not.
  2. $item \Vendidero\Germanized\Shipments\ShipmentItem The order item object.
  3. $args array Additional arguments to be considered.
  4. $order \Vendidero\Germanized\Shipments\Order The shipment order object.
add_filter( "woocommerce_gzd_shipment_item_needs_return", function( $needs_return, $item, $args, $order ) {
    // Do something
    return $needs_return;    
}, 10, 4 );

woocommerce_gzd_shipment_order_shippable_items Filter

Filter to adjust shippable order items for a specific order. By default excludes virtual items.

  1. $items \WC_Order_Item[] Array containing shippable order items.
  2. $order \WC_Order The order object.
  3. $order \Vendidero\Germanized\Shipments\Order The shipment order object.
add_filter( "woocommerce_gzd_shipment_order_shippable_items", function( $items, $order, $order ) {
    // Do something
    return $items;    
}, 10, 3 );