• Germanized
  • Hooks

Shipments

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

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

woocommerce_gzd_packaging_weight_unit Filter

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

woocommerce_gzd_packaging_dimension_unit Filter

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

woocommerce_gzd_shipment_has_status Filter

Filter to decide whether a Shipment has a certain status or not.

  1. $has_status bool Whether the Shipment has a status or not.
  2. $this \Vendidero\Germanized\Shipments\Shipment The shipment object.
  3. $status string The status to be checked against.
add_filter( "woocommerce_gzd_shipment_has_status", function( $has_status, $this, $status ) {
    // Do something
    return $has_status;    
}, 10, 3 );

woocommerce_gzd_get_shipment_address_street_number Filter

Filter to adjust the shipment address street number.

  1. $number string The shipment address street number.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_get_shipment_address_street_number", function( $number, $shipment ) {
    // Do something
    return $number;    
}, 10, 2 );

woocommerce_gzd_get_shipment_address_street Filter

Filter to adjust the shipment address street.

  1. $street string The shipment address street without street number.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_get_shipment_address_street", function( $street, $shipment ) {
    // Do something
    return $street;    
}, 10, 2 );

woocommerce_gzd_get_shipment_address_street_addition Filter

Filter to adjust the shipment address street addition.

  1. $addition string The shipment address street addition e.g. EG14.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_get_shipment_address_street_addition", function( $addition, $shipment ) {
    // Do something
    return $addition;    
}, 10, 2 );

woocommerce_gzd_get_shipment_address_street_addition_2 Filter

Filter to adjust the shipment address street addition.

  1. $addition string The shipment address street addition e.g. EG14.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_get_shipment_address_street_addition_2", function( $addition, $shipment ) {
    // Do something
    return $addition;    
}, 10, 2 );

woocommerce_gzd_shipment_send_to_external_pickup Filter

Filter to decide whether a Shipment is to be sent to a external pickup location e.g. packstation.

  1. $external bool True if the Shipment goes to a pickup location.
  2. $types array Array containing the types to be checked against, or empty.
  3. $this \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_shipment_send_to_external_pickup", function( $external, $types, $this ) {
    // Do something
    return $external;    
}, 10, 3 );

woocommerce_gzd_shipment_is_editable Filter

Filter to dedice whether the current Shipment is still editable or not.

  1. $is_editable bool Whether the Shipment is editable or not.
  2. $this \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_shipment_is_editable", function( $is_editable, $this ) {
    // Do something
    return $is_editable;    
}, 10, 2 );

woocommerce_gzd_shipment_edit_status Action

Action that fires after a shipment bulk status update has been processed.

  1. $shipment_id int The shipment id.
  2. $new_status string The new shipment status.
add_action( "woocommerce_gzd_shipment_edit_status", function( $shipment_id, $new_status ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_shipment_before_status_change Action

Action that fires before a shipment status transition happens.

  1. $shipment_id int The shipment id.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
  3. $status_transition array The status transition data.
add_action( "woocommerce_gzd_shipment_before_status_change", function( $shipment_id, $shipment, $status_transition ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_shipment_status_changed Action

Action that indicates shipment status change.

  1. $shipment_id int The shipment id.
  2. $status_from string The old shipment status.
  3. $status_to string The new shipment status.
  4. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_action( "woocommerce_gzd_shipment_status_changed", function( $shipment_id, $status_from, $status_to, $shipment ) {
    // Do something
        
}, 10, 4 );

woocommerce_gzd_shipment_contains_order_item Filter

Filter to adjust whether a Shipment contains a specific order item or not.

  1. $contains bool Whether the Shipment contains the order item or not.
  2. $order_item_id int[] The order item id(s).
  3. $this \Vendidero\Germanized\Shipments\Shipment The shipment object.
add_filter( "woocommerce_gzd_shipment_contains_order_item", function( $contains, $order_item_id, $this ) {
    // Do something
    return $contains;    
}, 10, 3 );

woocommerce_gzd_{$hook_postfix}shipment_after_save Action

Trigger action after saving shipment to the DB. The dynamic portion of this hook, `$hook_postfix` is used to construct a unique hook for a shipment type. Example hook name: woocommerce_gzd_shipment_after_save

  1. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment object being saved.
  2. $is_new bool Indicator to determine whether this is a new shipment or not.

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.

  1. $message string The success message.
  2. $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

  1. $param_1 string
  2. $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

  1. $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

  1. $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

  1. $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

  1. $param_1 string
  2. $param_2 string
  3. $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

  1. $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.

  1. $status string The default status.
  2. $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.

  1. $shipment \Vendidero\Germanized\Shipments\ReturnShipment The return shipment object.
  2. $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.

  1. $url string The redirect URL.
  2. $shipment \Vendidero\Germanized\Shipments\ReturnShipment The return shipment object.
  3. $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_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_supports_email_transmission Filter

Filter to adjust whether the email address may be transmitted to third-parties, e.g. the shipping provider (via label requests) or not.

  1. $supports_email_transmission bool Whether the order supports email transmission or not.
  2. $order \Vendidero\Germanized\Shipments\Order The order instance.
add_filter( "woocommerce_gzd_shipment_order_supports_email_transmission", function( $supports_email_transmission, $order ) {
    // Do something
    return $supports_email_transmission;    
}, 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_is_non_returnable Filter

  1. $param_1 string
  2. $param_2 string
  3. $param_3 string
add_filter( "woocommerce_gzd_shipment_order_item_is_non_returnable", function( $param_1, $param_2, $param_3 ) {
    // Do something
    return $param_1;    
}, 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 string
add_filter( "woocommerce_gzd_shipment_order_items_to_pack_left_for_shipping", function( $param ) {
    // Do something
    return $param;    
}, 10, 1 );

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

woocommerce_gzd_shipment_order_returnable_items Filter

Filter to adjust returnable items for a specific order.

  1. $items \Vendidero\Germanized\Shipments\ShipmentItem[] 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_returnable_items", function( $items, $order, $order ) {
    // Do something
    return $items;    
}, 10, 3 );

woocommerce_gzd_shipment_order_item_shippable_quantity Filter

Filter that allows adjusting the quantity left for shipping or a specific order item.

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

woocommerce_gzd_shipment_order_shippable_item_count Filter

Filters the total number of shippable items available in an order.

  1. $count int The total number of items.
  2. $order \Vendidero\Germanized\Shipments\Order The shipment order object.
add_filter( "woocommerce_gzd_shipment_order_shippable_item_count", function( $count, $order ) {
    // Do something
    return $count;    
}, 10, 2 );

woocommerce_gzd_shipment_order_returnable_item_count Filter

Filters the total number of returnable items available in an order.

  1. $count int The total number of items.
  2. $order \Vendidero\Germanized\Shipments\Order The shipment order object.
add_filter( "woocommerce_gzd_shipment_order_returnable_item_count", function( $count, $order ) {
    // Do something
    return $count;    
}, 10, 2 );

woocommerce_gzd_shipment_local_pickup_shipping_methods Filter

Filters which shipping methods are considered local pickup method which by default do not require shipment.

  1. $pickup_methods string[] Array of local pickup shipping method ids.
add_filter( "woocommerce_gzd_shipment_local_pickup_shipping_methods", function( $pickup_methods ) {
    // Do something
    return $pickup_methods;    
}, 10, 1 );

woocommerce_gzd_shipment_order_has_auto_packing Filter

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

woocommerce_gzd_shipment_order_needs_shipping Filter

Filter to decide whether an order needs shipping or not.

  1. $needs_shipping bool Whether the order needs shipping or not.
  2. $order \WC_Order The order object.
  3. $order \Vendidero\Germanized\Shipments\Order The shipment order object.
add_filter( "woocommerce_gzd_shipment_order_needs_shipping", function( $needs_shipping, $order, $order ) {
    // Do something
    return $needs_shipping;    
}, 10, 3 );

woocommerce_gzd_shipment_order_needs_return Filter

Filter to decide whether an order needs return or not.

  1. $needs_return bool Whether the order needs return or not.
  2. $order \WC_Order The order object.
  3. $order \Vendidero\Germanized\Shipments\Order The shipment order object.
add_filter( "woocommerce_gzd_shipment_order_needs_return", function( $needs_return, $order, $order ) {
    // Do something
    return $needs_return;    
}, 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 );