• Germanized
  • Hooks

Shipments

woocommerce_gzd_packaging_object_updated_props Action

Action that fires after updating a Packaging’s properties.

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

woocommerce_gzd_packaging_data_store_get_shipments_query Filter

Filter to adjust Packaging 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\Packaging The packaging data store object.
add_filter( "woocommerce_gzd_packaging_data_store_get_shipments_query", function( $wp_query_args, $query_vars, $data_store ) {
    // Do something
    return $wp_query_args;    
}, 10, 3 );

woocommerce_gzd_shipment_packaging_match_threshold Filter

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

woocommerce_gzd_find_available_packaging_for_shipment Filter

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

woocommerce_gzd_find_best_matching_packaging_for_shipment Filter

  1. $param_1 string
  2. $param_2 string
add_filter( "woocommerce_gzd_find_best_matching_packaging_for_shipment", function( $param_1, $param_2 ) {
    // Do something
    return $param_1;    
}, 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_new_{$hook_postfix}shipment Action

Action that indicates that a new Shipment has been created 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_get_shipment_default_status Filter

This filter is documented in src/Shipment.php

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

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_shipments_meta_box_shipment_item_after_{$column_name} Action

Action that fires after outputting a shipment item column in admin meta box. The dynamic portion of this hook `$column_name` refers to the column name e.g. name or quantity. Example hook name: woocommerce_gzd_shipments_meta_box_shipment_item_after_name

  1. $item_id int The shipment item id.
  2. $shipment_item \Vendidero\Germanized\Shipments\ShipmentItem The shipment item instance.
  3. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment instance.
  4. $column_name string The column name.

woocommerce_gzd_shipments_preview_after_column_shipping_to Action

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

woocommerce_gzd_shipments_preview_after_column_package Action

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

woocommerce_gzd_shipments_preview_after_columns Action

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

woocommerce_gzd_shipments_preview_before_item_list Action

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

woocommerce_gzd_shipments_preview_shipment_columns Filter

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

woocommerce_gzd_shipments_admin_settings_before_{$current_tab_name} Action

Before admin tab settings output. Executes right before setting output for a specific admin setting tab `$tab_name` e.g. shopmarks.

  1. $param string

woocommerce_gzd_shipments_admin_settings_before_{$current_tab_name}_{$current_section} Action

Before admin tab section settings output. Executes right before setting output for a specific admin setting tab `$tab_name` e.g. shopmarks. `$current_section` refers to the current section e.g. product_widgets.

  1. $settings array[] The settings array.

woocommerce_gzd_shipments_admin_settings_after_{$current_tab_name} Action

After admin tab settings output. Executes right after setting output for a specific admin setting tab `$tab_name` e.g. shopmarks.

  1. $settings array[] The settings array.

woocommerce_gzd_shipments_admin_settings_after_{$current_tab_name}_{$current_section} Action

After admin tab section settings output. Executes right after setting output for a specific admin setting tab `$tab_name` e.g. shopmarks. `$current_section` refers to the current section e.g. product_widgets.

  1. $settings array[] The settings array.

woocommerce_gzd_shipment_admin_before_columns Action

Action that fires before the first column of a Shipment’s meta box is being outputted.

  1. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_action( "woocommerce_gzd_shipment_admin_before_columns", function( $shipment ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipments_meta_box_shipment_after_left_column Action

Action that fires after the left column of a Shipment’s meta box admin view.

  1. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_action( "woocommerce_gzd_shipments_meta_box_shipment_after_left_column", function( $shipment ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipments_meta_box_shipment_before_label Action

Action that fires before outputting the label section of a Shipment’s meta box admin view.

  1. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_action( "woocommerce_gzd_shipments_meta_box_shipment_before_label", function( $shipment ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipments_meta_box_shipment_after_right_column Action

Action that fires after the right column of a Shipment’s meta box admin view.

  1. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_action( "woocommerce_gzd_shipments_meta_box_shipment_after_right_column", function( $shipment ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipments_meta_box_shipment_item_actions Action

Action that fires in the item action container of a Shipment’s meta box admin view.

  1. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_action( "woocommerce_gzd_shipments_meta_box_shipment_item_actions", function( $shipment ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipments_meta_box_shipment_after_fields Action

Action that fires after the fields of a Shipment’s meta box admin view have been rendered.

  1. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_action( "woocommerce_gzd_shipments_meta_box_shipment_after_fields", function( $shipment ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipments_meta_box_shipment_actions Action

Action that fires in the shipment action container of a Shipment’s meta box admin view.

  1. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_action( "woocommerce_gzd_shipments_meta_box_shipment_actions", function( $shipment ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipment_label_admin_after_download Action

Action that fires after the label download link of a shipment label was outputted.

  1. $label \Vendidero\Germanized\Shipments\Interfaces\ShipmentLabel The label object.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_action( "woocommerce_gzd_shipment_label_admin_after_download", function( $label, $shipment ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_shipments_meta_box_actions Action

Action that fires in the action container for Shipments of a specific order.

  1. $order_shipment \Vendidero\Germanized\Shipments\Order The shipment order object.
add_action( "woocommerce_gzd_shipments_meta_box_actions", function( $order_shipment ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipment_label_type Filter

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

woocommerce_gzd_shipment_label_types Filter

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

woocommerce_gzd_shipment_label_for_shipment Filter

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

woocommerce_gzd_shipment_label Filter

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

woocommerce_gzd_shipment_label_weight Filter

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

woocommerce_gzd_shipment_label_dimensions Filter

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

woocommerce_gzd_email_shipment_items_args Filter

Filter to adjust the arguments passed to retrieving ShipmentItems for display in an Email.

  1. $args array Array containing the arguments passed.
add_filter( "woocommerce_gzd_email_shipment_items_args", function( $args ) {
    // Do something
    return $args;    
}, 10, 1 );

woocommerce_gzd_email_shipment_items_table Filter

Filter that allows adjusting the HTML output of the shipment email item table.

  1. $html string The HTML output.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment instance.
add_filter( "woocommerce_gzd_email_shipment_items_table", function( $html, $shipment ) {
    // Do something
    return $html;    
}, 10, 2 );