• Germanized
  • Hooks

Shipments

woocommerce_gzd_updated_shipment_status Action

Action to indicate Shipment status change via WP Admin.

  1. $shipment_id int The shipment id.
  2. $status string The status to be switched to.
add_action( "woocommerce_gzd_updated_shipment_status", function( $shipment_id, $status ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_json_search_found_shipment_shipping_providers Filter

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

woocommerce_gzd_json_search_found_shipment_orders Filter

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

woocommerce_gzd_return_shipment_customer_confirmed Action

Action that fires after a return request has been confirmed to the customer.

  1. $shipment_id int The return shipment id.
  2. $shipment \Vendidero\Germanized\Shipments\ReturnShipment The return shipment object.
add_action( "woocommerce_gzd_return_shipment_customer_confirmed", function( $shipment_id, $shipment ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_return_shipment_sync_props Filter

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

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

woocommerce_gzd_return_shipment_synced Action

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

  1. $shipment \Vendidero\Germanized\Shipments\ReturnShipment The return 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_return_shipment_synced", function( $shipment, $order_shipment, $args ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_return_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_return_shipment_items_synced", function( $shipment, $order_shipment, $args ) {
    // Do something
        
}, 10, 3 );

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_shipments_rest_check_permissions Filter

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

woocommerce_gzd_rest_pre_insert_shipment_object Filter

Filters a shipment before it is inserted via the REST API.

  1. $shipment \Vendidero\Germanized\Shipments\Shipment Shipment object.
  2. $request \WP_REST_Request Request object.
add_filter( "woocommerce_gzd_rest_pre_insert_shipment_object", function( $shipment, $request ) {
    // Do something
    return $shipment;    
}, 10, 2 );

woocommerce_gzd_rest_set_shipment_item Action

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

woocommerce_gzd_rest_insert_shipment_object Action

Fires after a single shipment is created or updated via the REST API.

  1. $shipment \Vendidero\Germanized\Shipments\Shipment Inserted object.
  2. $request \WP_REST_Request Request object.
  3. $creating bool True when creating object, false when updating.
add_action( "woocommerce_gzd_rest_insert_shipment_object", function( $shipment, $request, $creating ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_rest_prepare_shipment_object Filter

Filter the shipment data for a response.

  1. $response \WP_REST_Response The response object.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment Object data.
  3. $request \WP_REST_Request Request object.
add_filter( "woocommerce_gzd_rest_prepare_shipment_object", function( $response, $shipment, $request ) {
    // Do something
    return $response;    
}, 10, 3 );

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_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_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_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_packaging Action

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

  1. $packaging_id int The packaging id.
  2. $packaging \Vendidero\Germanized\Shipments\Packaging The packaging instance.
add_action( "woocommerce_gzd_new_packaging", function( $packaging_id, $packaging ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_packaging_updated Action

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

  1. $packaging_id int The packaging id.
  2. $packaging \Vendidero\Germanized\Shipments\Packaging The packaging instance.
add_action( "woocommerce_gzd_packaging_updated", function( $packaging_id, $packaging ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_packaging_deleted Action

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

  1. $packaging_id int The packaging id.
  2. $packaging \Vendidero\Germanized\Shipments\Packaging The packaging instance.
add_action( "woocommerce_gzd_packaging_deleted", function( $packaging_id, $packaging ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_packaging_loaded Action

Action that indicates that a Packaging has been loaded from DB.

  1. $packaging \Vendidero\Germanized\Shipments\Packaging The Packaging object.
add_action( "woocommerce_gzd_packaging_loaded", function( $packaging ) {
    // Do something
        
}, 10, 1 );

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