• Germanized
  • Hooks

Shipments

woocommerce_gzd_shipment_query_clauses Filter

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

woocommerce_gzd_shipment_search_columns Filter

Filters the columns to search in a ShipmentQuery search. The default columns depend on the search term, and include ’shipment_id‘, ’shipment_country‘, ’shipment_tracking_id‘, ’shipment_order_id‘, ’shipment_shipping_provider‘ and ’shipment_shipping_method‘.

  1. $search_columns string[] Array of column names to be searched.
  2. $search string Text being searched.
  3. $this \Vendidero\Germanized\Shipments\ShipmentQuery The current ShipmentQuery instance.
add_filter( "woocommerce_gzd_shipment_search_columns", function( $search_columns, $search, $this ) {
    // Do something
    return $search_columns;    
}, 10, 3 );

woocommerce_gzd_shipments_disable_cart_packing Filter

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

woocommerce_gzd_shipments_before_prepare_cart_contents Action

add_action( "woocommerce_gzd_shipments_before_prepare_cart_contents", function(  ) {
    // Do something
        
}, 10 );

woocommerce_gzd_shipments_cart_item Filter

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

woocommerce_gzd_shipments_after_prepare_cart_contents Action

add_action( "woocommerce_gzd_shipments_after_prepare_cart_contents", function(  ) {
    // Do something
        
}, 10 );

woocommerce_gzd_shipments_get_methods_excluded_from_provider_settings Filter

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

woocommerce_gzd_shipments_shipping_method_is_excluded_from_provider_settings Filter

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

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 Filter

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

woocommerce_gzd_shipping_method_rule_condition_operators Filter

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

woocommerce_gzd_shipping_method_rule_condition_types Filter

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

woocommerce_gzd_shipping_method_available_packaging_ids Filter

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

woocommerce_gzd_shipping_method_rule_condition_{$condition_type_name}_applies Filter

  1. $param_1 string
  2. $param_2 string
  3. $param_3 string
  4. $param_4 string

woocommerce_gzd_shipping_method_rule_validate_{$validation_type} Filter

  1. $param_1 string
  2. $param_2 string
  3. $param_3 string
  4. $param_4 string

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\ShippingMethod\ProviderMethod 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_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_shipments_enable_{$type}_cache Filter

  1. $param_1 string
  2. $param_2 string

woocommerce_gzd_packaging_class Filter

Filter to adjust the classname used to construct a Packaging.

  1. $classname string The classname to be used.
  2. $packaging_id int The packaging id.
add_filter( "woocommerce_gzd_packaging_class", function( $classname, $packaging_id ) {
    // Do something
    return $classname;    
}, 10, 2 );

woocommerce_gzd_shipments_settings_main_breadcrumb Filter

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

woocommerce_gzd_shipment_label_admin_field_$postfix Action

  1. $param_1 string
  2. $param_2 string

woocommerce_gzd_shipments_product_options Action

  1. $param string
add_action( "woocommerce_gzd_shipments_product_options", function( $param ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipments_remove_legacy_customs_meta Filter

Remove legacy data upon saving in case it is not transmitted (e.g. DHL standalone plugin).

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

woocommerce_gzd_shipments_save_product_options Action

  1. $param string
add_action( "woocommerce_gzd_shipments_save_product_options", function( $param ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_shipments_include_requested_return_count_in_menu Filter

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

woocommerce_gzd_shipments_meta_box_shipment_item_columns Filter

Filter to adjust shipment item columns shown in admin view.

  1. $item_columns array The columns available.
  2. $shipment \Vendidero\Germanized\Shipments\Shipment The shipment.
add_filter( "woocommerce_gzd_shipments_meta_box_shipment_item_columns", function( $item_columns, $shipment ) {
    // Do something
    return $item_columns;    
}, 10, 2 );

woocommerce_gzd_shipments_table_bulk_action_handlers Filter

Filter to register new BulkActionHandler for certain Shipment bulk actions.

  1. $handlers array Array containing key => classname.
add_filter( "woocommerce_gzd_shipments_table_bulk_action_handlers", function( $handlers ) {
    // Do something
    return $handlers;    
}, 10, 1 );

woocommerce_gzd_shipments_last_tutorial_url Filter

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

woocommerce_gzd_shipment_labels_bulk_filename Filter

Filter to adjust the default filename chosen for bulk exporting shipment labels.

  1. $filename string The filename.
  2. $this \Vendidero\Germanized\Shipments\Admin\BulkLabel The `BulkLabel instance.
add_filter( "woocommerce_gzd_shipment_labels_bulk_filename", function( $filename, $this ) {
    // Do something
    return $filename;    
}, 10, 2 );

woocommerce_gzd_shipment_admin_provider_list Filter

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

woocommerce_gzd_shipments_admin_settings_tab_$postfix Filter

Filter to adjust the settings for a certain settings tab. The dynamic portion of the hook name, `$this->get_name()` refers to the tab name e.g. checkboxes.

  1. $settings array Array containing settings data.

woocommerce_gzd_shipments_admin_settings_tab_$postfix_{$section_id} Filter

Filter to adjust the settings for a certain section of a settings tab. The dynamic portion of the hook name, `$this->get_name()` refers to the tab name e.g. checkboxes. `$current_section` refers to the current section e.g. product_widget.

  1. $settings array Array containing settings data.

woocommerce_gzd_shipments_admin_settings Filter

General filter to adjust the settings for setting tabs.

  1. $settings array Array containing settings data.
  2. $tab_name string The name of the tab e.g. checkboxes
  3. $section_id string The section name e.g. product_widgets. Might be empty too.
add_filter( "woocommerce_gzd_shipments_admin_settings", function( $settings, $tab_name, $section_id ) {
    // Do something
    return $settings;    
}, 10, 3 );

woocommerce_gzd_shipments_admin_settings_before_wrapper_$postfix Action

Fires before settings for a certain tab are rendered. The dynamic portion of the hook name, $this->get_name(), refers to the current tab name e.g. checkboxes.

  1. $current_section string The current sub section of the tab.

woocommerce_gzd_shipments_admin_settings_before_save_$postfix Action

Fires before settings for a certain tab are saved. The dynamic portion of the hook name, `$this->get_name()`, refers to the current tab id e.g. checkboxes.

  1. $settings array Array containing the settings to be saved.
  2. $current_section string The current section.

woocommerce_gzd_shipments_admin_settings_before_save_$postfix_{$current_section} Action

Fires before settings for a certain section of a tab are saved. The dynamic portion of the hook name, `$this->get_name()` and `$current_section`, refer to the current tab id e.g. checkboxes and the current section name e.g. product_widgets.

  1. $settings array Array containing the settings to be saved.

woocommerce_gzd_shipments_admin_settings_after_save_$postfix Action

Fires after settings for a certain tab have been saved. The dynamic portion of the hook name, `$this->get_name()`, refers to the current tab id e.g. checkboxes.

  1. $settings array Array containing the settings to be saved.
  2. $current_section string The current section.

woocommerce_gzd_shipments_admin_settings_after_save_$postfix_{$current_section} Action

Fires after settings for a certain section of a tab are saved. The dynamic portion of the hook name, `$this->get_name()` and `$current_section`, refer to the current tab id e.g. checkboxes and the current section name e.g. product_widgets.

  1. $settings array Array containing the settings to be saved.

woocommerce_gzd_shipments_admin_settings_scripts Action

This action indicates that the admin settings scripts are enqueued.

add_action( "woocommerce_gzd_shipments_admin_settings_scripts", function(  ) {
    // Do something
        
}, 10 );

woocommerce_gzd_shipments_admin_settings_tabs Filter

Filter to register or remove certain setting tabs from the Germanized settings screen. Make sure that your class is loaded before adding it to the tabs array.

  1. $tabs array Array containing key => value pairs of tab name and class name.
add_filter( "woocommerce_gzd_shipments_admin_settings_tabs", function( $tabs ) {
    // Do something
    return $tabs;    
}, 10, 1 );

woocommerce_gzd_shipments_bulk_action Filter

Filter to decide whether a Shipment has changed during bulk action or not.

  1. $changed bool Whether the Shipment has changed or not.
  2. $action string The bulk action
  3. $redirect_to string The redirect URL.
  4. $table \Vendidero\Germanized\Shipments\Admin\Table The table instance.
  5. $param_5 string
add_filter( "woocommerce_gzd_shipments_bulk_action", function( $changed, $action, $redirect_to, $table, $param_5 ) {
    // Do something
    return $changed;    
}, 10, 5 );

woocommerce_gzd_shipments_admin_shipment_date_format Filter

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

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