• Germanized
  • Hooks

Shipments

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_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_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_last_shipment_with_tracking Filter

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

woocommerce_gzd_shipment_order_last_tracking_id Filter

  1. $param_1 string
  2. $param_2 string
add_filter( "woocommerce_gzd_shipment_order_last_tracking_id", 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_shipment_position_number Filter

  1. $param_1 string
  2. $param_2 string
  3. $param_3 string
add_filter( "woocommerce_gzd_shipment_order_shipment_position_number", 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_shipments_order_after_get_items Action

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.
add_action( "woocommerce_gzd_shipments_order_after_get_items", function( $items ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipment_order_shippable_items Filter

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

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

woocommerce_gzd_shipment_order_has_pickup_location Filter

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

woocommerce_gzd_shipment_order_pickup_location_customer_number Filter

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

woocommerce_gzd_shipment_order_pickup_location_code Filter

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

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

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

woocommerce_gzd_shipments_packaging_report_default_shipment_types Filter

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

woocommerce_gzd_shipments_packaging_report_batch_size Filter

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

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

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

woocommerce_gzd_shipments_order_shipped Action

Action that fires as soon as an order has been shipped completely. That is the case when the order contains all relevant shipments and all the shipments are marked as shipped.

  1. $order_id string The order id.
add_action( "woocommerce_gzd_shipments_order_shipped", function( $order_id ) {
    // Do something
        
}, 10, 1 );

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