• Germanized
  • Hooks

Shipments

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

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

woocommerce_gzd_shipping_provider_method_admin_settings Filter

Filter to adjust admin settings added to the shipment method instance specifically for shipping providers.

  1. $settings array Admin setting fields.
add_filter( "woocommerce_gzd_shipping_provider_method_admin_settings", function( $settings ) {
    // Do something
    return $settings;    
}, 10, 1 );

woocommerce_gzd_shipping_provider_method_default_provider Filter

Filter to adjust default shipping provider pre-selected within shipping provider method settings.

  1. $provider_name string The shipping provider name e.g. dhl.
add_filter( "woocommerce_gzd_shipping_provider_method_default_provider", function( $provider_name ) {
    // Do something
    return $provider_name;    
}, 10, 1 );

woocommerce_gzd_shipping_provider_method_admin_settings_wrapped Filter

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

woocommerce_gzd_shipping_provider_method_provider Filter

Filter that allows adjusting the shipping provider chosen for a specific shipping method.

  1. $provider_slug string The shipping provider.
  2. $method_id string The shipping method id.
  3. $method \Vendidero\Germanized\Shipments\ShippingProvider\Method The method instance.
add_filter( "woocommerce_gzd_shipping_provider_method_provider", function( $provider_slug, $method_id, $method ) {
    // Do something
    return $provider_slug;    
}, 10, 3 );

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

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

  1. $item \WC_Order_Item|\Vendidero\Germanized\Shipments\ShipmentItem The order item object or parent shipment item.
  2. $args array Array containing props in key => value pairs which have been updated.
  3. $param_3 string
add_action( "woocommerce_gzd_shipment_item_synced", function( $item, $args, $param_3 ) {
    // Do something
        
}, 10, 3 );

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

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

woocommerce_gzd_email_shipment_items_args Filter

Filter to adjust the arguments passed to retrieving ShipmentItems for display in an Email.

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

  1. $html string The HTML output.
  2. $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_shipments_meta_box_actions Action

Action that fires in the action container for Shipments of a specific order.

  1. $order_shipment \Vendidero\Germanized\Shipments\Order The shipment order object.
add_action( "woocommerce_gzd_shipments_meta_box_actions", function( $order_shipment ) {
    // Do something
        
}, 10, 1 );

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

  1. $item_id int The shipment item id.
  2. $shipment_item \Vendidero\Germanized\Shipments\ShipmentItem The shipment item instance.
  3. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment instance.
  4. $column_name string The column name.

woocommerce_gzd_shipment_label_admin_after_download Action

Action that fires after the label download link of a shipment label was outputted.

  1. $label \Vendidero\Germanized\Shipments\Interfaces\ShipmentLabel The label object.
  2. $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_shipment_admin_before_columns Action

Action that fires before the first column of a Shipment’s meta box is being outputted.

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

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

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

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

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

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

  1. $classname string The classname.
  2. $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).

  1. $placeholder \Vendidero\Germanized\Shipments\ShippingProvider\MethodPlaceholder The placeholder impl.
  2. $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.

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

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

  1. $shipment_statuses array The available shipment statuses.
  2. $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.

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

  1. $shipment_statuses array The available shipment statuses.
  2. $type string The shipment type e.g. return.
  3. $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

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

  1. $reasons array Available return reasons.
  2. $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.

  1. $reasons \Vendidero\Germanized\Shipments\ReturnReason[] Available return reasons.
  2. $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.

  1. $statuses array Statuses which should be considered as editable.
add_filter( "woocommerce_gzd_shipment_editable_statuses", function( $statuses ) {
    // Do something
    return $statuses;    
}, 10, 1 );