Hooks available in the Shipment package bundled in Germanized.
woocommerce_gzd_email_shipment_items_args Filter
Filter to adjust the arguments passed to retrieving ShipmentItems for display in an Email.
$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.
$html
string The HTML output.$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 );
woocommerce_gzd_shipment_type_data Filter
$param
array
add_filter( "woocommerce_gzd_shipment_type_data", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_order_shipping_statuses Filter
Filter to adjust or add order shipping statuses. An order might retrieve a shipping status e.g. not shipped.
$shipment_statuses
array Available order shipping statuses.
add_filter( "woocommerce_gzd_order_shipping_statuses", function( $shipment_statuses ) { // Do something return $shipment_statuses; }, 10, 1 );
woocommerce_gzd_order_return_statuses Filter
Filter to adjust or add order return statuses. An order might retrieve a shipping status e.g. not shipped.
$shipment_statuses
array Available order return statuses.
add_filter( "woocommerce_gzd_order_return_statuses", function( $shipment_statuses ) { // Do something return $shipment_statuses; }, 10, 1 );
woocommerce_gzd_shipping_provider_method_classname Filter
Filter to adjust the classname used to construct the shipping provider method which contains additional provider related settings useful for shipments.
$classname
string The classname.$method
\WC_Shipping_Method The shipping method instance.
add_filter( "woocommerce_gzd_shipping_provider_method_classname", function( $classname, $method ) { // Do something return $classname; }, 10, 2 );
woocommerce_gzd_shipping_provider_method_fallback Filter
Filter to adjust the fallback shipping method to be loaded if no real shipping method was able to be constructed (e.g. a custom plugin is being used which replaces the default Woo shipping zones integration).
$placeholder
\Vendidero\Germanized\Shipments\ShippingProvider\MethodPlaceholder The placeholder impl.$original_id
string The shipping method id.
add_filter( "woocommerce_gzd_shipping_provider_method_fallback", function( $placeholder, $original_id ) { // Do something return $placeholder; }, 10, 2 );
woocommerce_gzd_order_shipping_status_name Filter
Filter to adjust the status name for a certain order shipping status.
$status_name
string The status name.$status
string The shipping status.
add_filter( "woocommerce_gzd_order_shipping_status_name", function( $status_name, $status ) { // Do something return $status_name; }, 10, 2 );
woocommerce_gzd_order_return_status_name Filter
Filter to adjust the status name for a certain order return status.
$status_name
string The status name.$status
string The return status.
add_filter( "woocommerce_gzd_order_return_status_name", function( $status_name, $status ) { // Do something return $status_name; }, 10, 2 );
woocommerce_gzd_shipment_customer_visible_statuses Filter
Filter to decide which shipment statuses should be visible to customers e.g. whether a shipment of a certain status should be shown or not.
$shipment_statuses
array The available shipment statuses.$shipment_type
string The shipment type.
add_filter( "woocommerce_gzd_shipment_customer_visible_statuses", function( $shipment_statuses, $shipment_type ) { // Do something return $shipment_statuses; }, 10, 2 );
woocommerce_gzd_shipment_statuses Filter
Add or adjust available Shipment statuses.
$shipment_statuses
array The available shipment statuses.
add_filter( "woocommerce_gzd_shipment_statuses", function( $shipment_statuses ) { // Do something return $shipment_statuses; }, 10, 1 );
woocommerce_gzd_shipment_selectable_statuses Filter
Add or remove selectable shipment statuses for a certain shipment and/or shipment type.
$shipment_statuses
array The available shipment statuses.$type
string The shipment type e.g. return.$shipment
\Vendidero\Germanized\Shipments\Shipment The shipment instance.
add_filter( "woocommerce_gzd_shipment_selectable_statuses", function( $shipment_statuses, $type, $shipment ) { // Do something return $shipment_statuses; }, 10, 3 );
woocommerce_gzd_allow_customer_return_empty_return_reason Filter
$param_1
bool$param_2
string
add_filter( "woocommerce_gzd_allow_customer_return_empty_return_reason", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_return_shipment_reasons_raw Filter
Filter that allows adjusting raw return reasons for a specific shipment (e.g. array containing reason data with code, reason and order).
$reasons
array Available return reasons.$order_item
\WC_Order_Item|false The order item object if available to further filter reasons.
add_filter( "woocommerce_gzd_return_shipment_reasons_raw", function( $reasons, $order_item ) { // Do something return $reasons; }, 10, 2 );
woocommerce_gzd_return_shipment_reasons Filter
Filter that allows to adjust available return reasons for a specific shipment.
$reasons
\Vendidero\Germanized\Shipments\ReturnReason[] Available return reasons.$order_item
\WC_Order_Item|false The order item object if available to further filter reasons.
add_filter( "woocommerce_gzd_return_shipment_reasons", function( $reasons, $order_item ) { // Do something return $reasons; }, 10, 2 );
woocommerce_gzd_shipment_editable_statuses Filter
Filter that allows to adjust Shipment statuses which decide upon whether a Shipment is editable or not.
$statuses
array Statuses which should be considered as editable.
add_filter( "woocommerce_gzd_shipment_editable_statuses", function( $statuses ) { // Do something return $statuses; }, 10, 1 );
woocommerce_gzd_default_shipping_provider Filter
Filter to adjust the default shipping provider used as a fallback for shipments for which no provider could be determined automatically (e.g. by the chosen shipping methid).
$title
string The shipping provider slug.
add_filter( "woocommerce_gzd_default_shipping_provider", function( $title ) { // Do something return $title; }, 10, 1 );
woocommerce_gzd_shipping_provider_title Filter
Filter to adjust the title of a certain shipping provider e.g. DHL.
$title
string The shipping provider title.$slug
string The shipping provider slug.
add_filter( "woocommerce_gzd_shipping_provider_title", function( $title, $slug ) { // Do something return $title; }, 10, 2 );
woocommerce_gzd_shipping_provider_unknown_title Filter
$param
string
add_filter( "woocommerce_gzd_shipping_provider_unknown_title", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipment_default_address_fields Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_shipment_default_address_fields", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_shipment_{$address_type}_address_fields Filter
$param_1
string$param_2
string
woocommerce_gzd_shipment_order_shipping_method_id Filter
Allows adjusting the shipping method id for a certain Order.
$id
string The shipping method id.$order
\WC_Order The order object.
add_filter( "woocommerce_gzd_shipment_order_shipping_method_id", function( $id, $order ) { // Do something return $id; }, 10, 2 );
woocommerce_gzd_shipment_status_name Filter
Filter to adjust the shipment status name or title.
$status_name
string The status name or title.$status
int The status slug.
add_filter( "woocommerce_gzd_shipment_status_name", function( $status_name, $status ) { // Do something return $status_name; }, 10, 2 );
woocommerce_gzd_shipment_sent_statuses Filter
Filter to adjust which Shipment statuses should be considered as sent.
$statuses
array An array of statuses considered as shipped,
add_filter( "woocommerce_gzd_shipment_sent_statuses", function( $statuses ) { // Do something return $statuses; }, 10, 1 );
woocommerce_gzd_shipment_item_class Filter
This filter may adjust the item class added to the shipment details table row on the customer account page.
$item
\Vendidero\Germanized\Shipments\ShipmentItem The shipment item instance.$shipment
\Vendidero\Germanized\Shipments\Shipment The shipment instance.$param_3
string
add_filter( "woocommerce_gzd_shipment_item_class", function( $item, $shipment, $param_3 ) { // Do something return $item; }, 10, 3 );
woocommerce_gzd_format_shipment_dimensions Filter
Filter to adjust the format of Shipment dimensions e.g. LxBxH.
$dimension_string
string The dimension string.$dimensions
array Array containing the dimensions.$unit
string The dimension unit.
add_filter( "woocommerce_gzd_format_shipment_dimensions", function( $dimension_string, $dimensions, $unit ) { // Do something return $dimension_string; }, 10, 3 );
woocommerce_gzd_format_shipment_weight Filter
Filter to adjust the format of Shipment weight.
$weight_string
string The weight string.$weight
string The Shipment weight.$unit
string The dimension unit.
add_filter( "woocommerce_gzd_format_shipment_weight", function( $weight_string, $weight, $unit ) { // Do something return $weight_string; }, 10, 3 );
woocommerce_gzd_account_shipments_columns Filter
Filter to adjust columns being used to display shipments in a table view on the customer account page.
$columns
string[] The columns in key => value pairs.$type
string The shipment type e.g. simple or return.
add_filter( "woocommerce_gzd_account_shipments_columns", function( $columns, $type ) { // Do something return $columns; }, 10, 2 );
woocommerce_gzd_shipments_add_return_shipment_url Filter
Filter to adjust the URL the customer (or guest) might access to add a return to a certain order.
$url
string The URL pointing to the add return page.$order
\Vendidero\Germanized\Shipments\Order The order object.
add_filter( "woocommerce_gzd_shipments_add_return_shipment_url", function( $url, $order ) { // Do something return $url; }, 10, 2 );
woocommerce_gzd_order_return_completed_date Filter
Filter to adjust the completed date of an order used to determine whether an order is still returnable by the customer or not. The date is constructed by checking for existence in the following order: 1. The date the order was shipped completely 2. The date the order was marked as completed 3. The date the order was created
$completed_date
\WC_DateTime The order completed date.$order
\WC_Order The order instance.
add_filter( "woocommerce_gzd_order_return_completed_date", function( $completed_date, $order ) { // Do something return $completed_date; }, 10, 2 );
woocommerce_gzd_order_is_returnable_by_customer Filter
Filter to decide whether a customer might add return request to a certain order.
$is_returnable
bool Whether or not shipment supports customer added returns$order
\WC_Order The order instance for which the return shall be created.$check_date
bool Whether to check for a maximum date or not.
add_filter( "woocommerce_gzd_order_is_returnable_by_customer", function( $is_returnable, $order, $check_date ) { // Do something return $is_returnable; }, 10, 3 );
woocommerce_gzd_get_order_shipping_provider Filter
Filters the shipping provider detected for a specific order.
$provider
bool|\Vendidero\Germanized\Shipments\Interfaces\ShippingProvider The shipping provider instance.$order
\WC_Order The order instance.
add_filter( "woocommerce_gzd_get_order_shipping_provider", function( $provider, $order ) { // Do something return $provider; }, 10, 2 );
woocommerce_gzd_customer_can_view_shipments Filter
Filters whether a logged in user (or guest) might view shipments belonging to an order or not.
$can_view_shipments
bool Whether the user (or guest) might see shipments or not.$order_id
int The order id.
add_filter( "woocommerce_gzd_customer_can_view_shipments", function( $can_view_shipments, $order_id ) { // Do something return $can_view_shipments; }, 10, 2 );
woocommerce_gzd_customer_return_needs_manual_confirmation Filter
Filter to decide whether a customer added return of a certain order needs manual confirmation by the shop manager or not.
$needs_manual_confirmation
bool Whether needs manual confirmation or not.$order
\WC_Order The order instance for which the return shall be created.
add_filter( "woocommerce_gzd_customer_return_needs_manual_confirmation", function( $needs_manual_confirmation, $order ) { // Do something return $needs_manual_confirmation; }, 10, 2 );
woocommerce_gzd_account_shipments_actions Filter
Filter to adjust available actions in the shipments table view on the customer account page for a specific shipment.
$actions
string[] Available actions containing an id as key and a URL and name.$shipment
\Vendidero\Germanized\Shipments\Shipment The shipment instance.
add_filter( "woocommerce_gzd_account_shipments_actions", function( $actions, $shipment ) { // Do something return $actions; }, 10, 2 );
woocommerce_gzd_packaging_types Filter
$param
string
add_filter( "woocommerce_gzd_packaging_types", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_packaging_weight_unit Filter
$param
string
add_filter( "woocommerce_gzd_packaging_weight_unit", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_packaging_dimension_unit Filter
$param
string
add_filter( "woocommerce_gzd_packaging_dimension_unit", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipment_label_type Filter
$param_1
string$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
$param
array
add_filter( "woocommerce_gzd_shipment_label_types", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipment_label_for_shipment Filter
$param_1
string$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
$param_1
string$param_2
string$param_3
string$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
$param_1
string$param_2
string$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
$param_1
string$param_2
string$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_shipment_label_admin_after_download Action
Action that fires after the label download link of a shipment label was outputted.
$label
\Vendidero\Germanized\Shipments\Interfaces\ShipmentLabel The label object.$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_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
$item_id
int The shipment item id.$shipment_item
\Vendidero\Germanized\Shipments\ShipmentItem The shipment item instance.$shipment
\Vendidero\Germanized\Shipments\Shipment The shipment instance.$column_name
string The column name.
woocommerce_gzd_shipment_admin_before_columns Action
Action that fires before the first column of a Shipment’s meta box is being outputted.
$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.
$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_after_right_column Action
Action that fires after the right column of a Shipment’s meta box admin view.
$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.
$shipment
\Vendidero\Germanized\Shipments\Shipment The shipment object.
add_action( "woocommerce_gzd_shipments_meta_box_shipment_item_actions", function( $shipment ) { // Do something }, 10, 1 );