Hooks available in the Shipment package bundled in Germanized.
woocommerce_gzd_new_packaging Action
Action that indicates that a new Packaging has been created in the DB.
$packaging_id
int The packaging id.$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.
$packaging_id
int The packaging id.$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.
$packaging_id
int The packaging id.$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.
$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.
$packaging
\Vendidero\Germanized\Shipments\Packaging The Packaging object.$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.
$wp_query_args
array Array containing parsed query arguments.$query_vars
array The original query arguments.$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
$param_1
numeric$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
$param_1
string$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
$param_1
string$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.
$label_id
int The label id.$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.
$label_id
int The label id.$label
\Vendidero\Germanized\Shipments\DataStores\Label The label instance.$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.
$label_id
int The label id.$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.
$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.
$label
\Vendidero\Germanized\Shipments\Labels\Label The label object.$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.
$wp_query_args
array Parsed query arguments.$query_vars
array Original query arguments.$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_shipping_provider Action
Action that indicates that a new Shipping Provider has been created in the DB.
$provider_id
int The provider id.$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
$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
$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.
$shipping_provider_id
int The shipping provider id.$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.
$shipping_provider_id
int The shipping provider id.$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.
$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.
$provider
\Vendidero\Germanized\Shipments\ShippingProvider\Simple The shipping provider object.$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_new_shipment_item Action
Action that indicates that a new ShipmentItem has been created in the DB.
$shipment_item_id
int The shipment item id.$item
\Vendidero\Germanized\Shipments\ShipmentItem The shipment item object.$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.
$shipment_item_id
int The shipment item id.$item
\Vendidero\Germanized\Shipments\ShipmentItem The shipment item object.$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.
$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.
$shipment_item_id
int The shipment item id.$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.
$item
\Vendidero\Germanized\Shipments\ShipmentItem The shipment item object.$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.
$shipment_id
int The shipment id.$shipment
\Vendidero\Germanized\Shipments\DataStores\Shipment The shipment instance.
woocommerce_gzd_get_shipment_default_status Filter
This filter is documented in src/Shipment.php
$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.
$shipment_id
int The shipment id.$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.
$shipment_id
int The shipment id.$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.
$shipment
\Vendidero\Germanized\Shipments\Shipment The shipment object.
woocommerce_gzd_shipment_object_updated_props Action
Action that fires after updating a Shipment’s properties.
$shipment
\Vendidero\Germanized\Shipments\Shipment The shipment object.$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.
$wp_query_args
array Array containing parsed query arguments.$query_vars
array The original query arguments.$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_customer_new_return_shipment_request_success_message Filter
This filter may be used to adjust the default success message returned to the customer after successfully adding a return shipment.
$message
string The success message.$needs_manual_confirmation
bool Whether the request needs manual confirmation or not.
add_filter( "woocommerce_gzd_customer_new_return_shipment_request_success_message", function( $message, $needs_manual_confirmation ) { // Do something return $message; }, 10, 2 );
woocommerce_gzd_return_request_order_id_from_string Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_return_request_order_id_from_string", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_return_request_successful Action
$param
string
add_action( "woocommerce_gzd_return_request_successful", function( $param ) { // Do something }, 10, 1 );
woocommerce_gzd_return_request_failed Action
add_action( "woocommerce_gzd_return_request_failed", function( ) { // Do something }, 10 );
woocommerce_gzd_return_request_order_query_args Filter
$param
array
add_filter( "woocommerce_gzd_return_request_order_query_args", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_return_request_alternate_order_query_args Filter
$param
array
add_filter( "woocommerce_gzd_return_request_alternate_order_query_args", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipments_valid_order_for_return_request Filter
$param_1
string$param_2
string$param_3
string
add_filter( "woocommerce_gzd_shipments_valid_order_for_return_request", function( $param_1, $param_2, $param_3 ) { // Do something return $param_1; }, 10, 3 );
woocommerce_gzd_return_request_customer_order_number_meta_key Filter
$param
string
add_filter( "woocommerce_gzd_return_request_customer_order_number_meta_key", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_customer_new_return_shipment_request_status Filter
This filter may be used to adjust the default status of a return shipment added by a customer.
$status
string The default status.$order
\WC_Order The order object.
add_filter( "woocommerce_gzd_customer_new_return_shipment_request_status", function( $status, $order ) { // Do something return $status; }, 10, 2 );
woocommerce_gzd_new_customer_return_shipment_request Action
This hook is fired after a customer has added a new return request for a specific shipment. The return shipment object has been added successfully.
$shipment
\Vendidero\Germanized\Shipments\ReturnShipment The return shipment object.$order
\WC_Order The order object.
add_action( "woocommerce_gzd_new_customer_return_shipment_request", function( $shipment, $order ) { // Do something }, 10, 2 );
woocommerce_gzd_customer_new_return_shipment_request_redirect Filter
This filter may be used to adjust the redirect of a customer after adding a new return shipment. In case the return request needs manual confirmation the customer will be redirected to the parent shipment.
$url
string The redirect URL.$shipment
\Vendidero\Germanized\Shipments\ReturnShipment The return shipment object.$needs_manual_confirmation
bool Whether the request needs manual confirmation or not.
add_filter( "woocommerce_gzd_customer_new_return_shipment_request_redirect", function( $url, $shipment, $needs_manual_confirmation ) { // Do something return $url; }, 10, 3 );
woocommerce_gzd_shipment_sync_props Filter
Filter to allow adjusting the shipment props synced from the corresponding order.
$args
mixed The properties in key => value pairs.$shipment
\Vendidero\Germanized\Shipments\SimpleShipment The shipment object.$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.
$shipment
\Vendidero\Germanized\Shipments\SimpleShipment The shipment object.$order_shipment
\Vendidero\Germanized\Shipments\Order The shipment order object.$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.
$shipment
\Vendidero\Germanized\Shipments\SimpleShipment The shipment object.$order_shipment
\Vendidero\Germanized\Shipments\Order The shipment order object.$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_packaging_report_batch_size Filter
$param
numeric
add_filter( "woocommerce_gzd_shipments_packaging_report_batch_size", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipments_packaging_report_valid_statuses Filter
$param
string
add_filter( "woocommerce_gzd_shipments_packaging_report_valid_statuses", function( $param ) { // Do something return $param; }, 10, 1 );