Hooks available in the Shipment package bundled in Germanized.
woocommerce_gzd_shipments_init Action
add_action( "woocommerce_gzd_shipments_init", function( ) { // Do something }, 10 );
woocommerce_gzd_shipments_compatibilities Filter
$param
array
add_filter( "woocommerce_gzd_shipments_compatibilities", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_enable_rucksack_packaging Filter
$param
bool
add_filter( "woocommerce_gzd_enable_rucksack_packaging", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipments_is_pro Filter
$param
bool
add_filter( "woocommerce_gzd_shipments_is_pro", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipment_base_country Filter
$param
string
add_filter( "woocommerce_gzd_shipment_base_country", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipment_base_postcode Filter
$param
string
add_filter( "woocommerce_gzd_shipment_base_postcode", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_country_belongs_to_eu_customs_area Filter
$param_1
string$param_2
string$param_3
string
add_filter( "woocommerce_gzd_country_belongs_to_eu_customs_area", function( $param_1, $param_2, $param_3 ) { // Do something return $param_1; }, 10, 3 );
woocommerce_gzd_base_country_supports_export_reference_number Filter
$param
string
add_filter( "woocommerce_gzd_base_country_supports_export_reference_number", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipments_updated Action
add_action( "woocommerce_gzd_shipments_updated", function( ) { // Do something }, 10 );
woocommerce_gzd_shipments_is_shipping_debug_mode Filter
$param
string
add_filter( "woocommerce_gzd_shipments_is_shipping_debug_mode", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipments_enable_logging Filter
$param
string
add_filter( "woocommerce_gzd_shipments_enable_logging", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipments_upload_dir Filter
Filter to adjust the upload directory used to store shipment related files. By default files are stored in a custom directory under wp-content/uploads.
$upload_dir
array Array containing `wp_upload_dir` data.
add_filter( "woocommerce_gzd_shipments_upload_dir", function( $upload_dir ) { // Do something return $upload_dir; }, 10, 1 );
woocommerce_gzd_shipments_relative_upload_dir Filter
Filter to retrieve the relative upload path used for storing shipment related files.
$path
array Relative path.
add_filter( "woocommerce_gzd_shipments_relative_upload_dir", function( $path ) { // Do something return $path; }, 10, 1 );
woocommerce_gzd_shipments_upload_path Filter
Filter to adjust the upload path used to store shipment related files. By default files are stored in a custom directory under wp-content/uploads.
$path
string Path to the upload directory.
add_filter( "woocommerce_gzd_shipments_upload_path", function( $path ) { // Do something return $path; }, 10, 1 );
woocommerce_gzd_shipments_upload_url Filter
Filter to adjust the upload URL used to retrieve shipment related files. By default files are stored in a custom directory under wp-content/uploads.
$url
string URL to the upload directory.
add_filter( "woocommerce_gzd_shipments_upload_url", function( $url ) { // Do something return $url; }, 10, 1 );
woocommerce_gzd_shipments_enabled Filter
$param
bool
add_filter( "woocommerce_gzd_shipments_enabled", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipments_template_path Filter
$param
string
add_filter( "woocommerce_gzd_shipments_template_path", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipments_locate_theme_template_locations Filter
$param_1
array$param_2
string
add_filter( "woocommerce_gzd_shipments_locate_theme_template_locations", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_shipments_registered_data_stores Action
add_action( "woocommerce_gzd_shipments_registered_data_stores", function( ) { // Do something }, 10 );
woocommerce_gzd_shipments_get_i18n_path Filter
$param
string
add_filter( "woocommerce_gzd_shipments_get_i18n_path", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipments_get_i18n_textdomain Filter
$param
string
add_filter( "woocommerce_gzd_shipments_get_i18n_textdomain", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_shipments_is_provider_integration_active Filter
$param_1
string$param_2
string$param_3
string
add_filter( "woocommerce_gzd_shipments_is_provider_integration_active", function( $param_1, $param_2, $param_3 ) { // Do something return $param_1; }, 10, 3 );
woocommerce_gzd_shipments_is_woocommerce_activated Filter
$param
string
add_filter( "woocommerce_gzd_shipments_is_woocommerce_activated", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_plugins_install_api_error Action
$param_1
string$param_2
string
add_action( "woocommerce_gzd_plugins_install_api_error", function( $param_1, $param_2 ) { // Do something }, 10, 2 );
woocommerce_gzd_shipments_plugins_install_error Action
$param_1
string$param_2
string$param_3
string$param_4
string
add_action( "woocommerce_gzd_shipments_plugins_install_error", function( $param_1, $param_2, $param_3, $param_4 ) { // Do something }, 10, 4 );
woocommerce_gzd_return_shipment_customer_confirmed Action
Action that fires after a return request has been confirmed to the customer.
$shipment_id
int The return shipment id.$shipment
\Vendidero\Germanized\Shipments\ReturnShipment The return shipment object.
add_action( "woocommerce_gzd_return_shipment_customer_confirmed", function( $shipment_id, $shipment ) { // Do something }, 10, 2 );
woocommerce_gzd_return_shipment_sync_props Filter
Filter to allow adjusting the return shipment props synced from the corresponding order.
$args
mixed The properties in key => value pairs.$shipment
\Vendidero\Germanized\Shipments\ReturnShipment The shipment object.$order_shipment
\Vendidero\Germanized\Shipments\Order The shipment order object.
add_filter( "woocommerce_gzd_return_shipment_sync_props", function( $args, $shipment, $order_shipment ) { // Do something return $args; }, 10, 3 );
woocommerce_gzd_return_shipment_synced Action
Action that fires after a return shipment has been synced. Syncing is used to keep the shipment in sync with the corresponding parent shipment.
$shipment
\Vendidero\Germanized\Shipments\ReturnShipment The return shipment object.$order_shipment
\Vendidero\Germanized\Shipments\Order The shipment order object.$args
array Array containing properties in key => value pairs to be updated.
add_action( "woocommerce_gzd_return_shipment_synced", function( $shipment, $order_shipment, $args ) { // Do something }, 10, 3 );
woocommerce_gzd_return_shipment_items_synced Action
Action that fires after items of a shipment have been synced.
$shipment
\Vendidero\Germanized\Shipments\SimpleShipment The shipment object.$order_shipment
\Vendidero\Germanized\Shipments\Order The shipment order object.$args
array Array containing additional data e.g. items.
add_action( "woocommerce_gzd_return_shipment_items_synced", function( $shipment, $order_shipment, $args ) { // Do something }, 10, 3 );
woocommerce_gzd_shipments_rest_check_permissions Filter
$param_1
string$param_2
string$param_3
string$param_4
string
add_filter( "woocommerce_gzd_shipments_rest_check_permissions", function( $param_1, $param_2, $param_3, $param_4 ) { // Do something return $param_1; }, 10, 4 );
woocommerce_gzd_rest_pre_insert_shipment_object Filter
Filters a shipment before it is inserted via the REST API.
$shipment
\Vendidero\Germanized\Shipments\Shipment Shipment object.$request
\WP_REST_Request Request object.
add_filter( "woocommerce_gzd_rest_pre_insert_shipment_object", function( $shipment, $request ) { // Do something return $shipment; }, 10, 2 );
woocommerce_gzd_rest_set_shipment_item Action
$param_1
string$param_2
string
add_action( "woocommerce_gzd_rest_set_shipment_item", function( $param_1, $param_2 ) { // Do something }, 10, 2 );
woocommerce_gzd_rest_insert_shipment_object Action
Fires after a single shipment is created or updated via the REST API.
$shipment
\Vendidero\Germanized\Shipments\Shipment Inserted object.$request
\WP_REST_Request Request object.$creating
bool True when creating object, false when updating.
add_action( "woocommerce_gzd_rest_insert_shipment_object", function( $shipment, $request, $creating ) { // Do something }, 10, 3 );
woocommerce_gzd_rest_prepare_shipment_object Filter
Filter the shipment data for a response.
$response
\WP_REST_Response The response object.$shipment
\Vendidero\Germanized\Shipments\Shipment Object data.$request
\WP_REST_Request Request object.
add_filter( "woocommerce_gzd_rest_prepare_shipment_object", function( $response, $shipment, $request ) { // Do something return $response; }, 10, 3 );
woocommerce_gzd_packaging_inner_dimension_use_percentage_buffer Filter
$param_1
string$param_2
string$param_3
string
add_filter( "woocommerce_gzd_packaging_inner_dimension_use_percentage_buffer", function( $param_1, $param_2, $param_3 ) { // Do something return $param_1; }, 10, 3 );
woocommerce_gzd_packaging_inner_dimension_percentage_buffer Filter
$param_1
string$param_2
string$param_3
string
add_filter( "woocommerce_gzd_packaging_inner_dimension_percentage_buffer", function( $param_1, $param_2, $param_3 ) { // Do something return $param_1; }, 10, 3 );
woocommerce_gzd_packaging_inner_dimension_fixed_buffer_mm Filter
$param_1
string$param_2
string$param_3
string
add_filter( "woocommerce_gzd_packaging_inner_dimension_fixed_buffer_mm", function( $param_1, $param_2, $param_3 ) { // Do something return $param_1; }, 10, 3 );
woocommerce_gzd_shipments_packer_instance Filter
$param_1
string$param_2
string$param_3
string$param_4
string
add_filter( "woocommerce_gzd_shipments_packer_instance", function( $param_1, $param_2, $param_3, $param_4 ) { // Do something return $param_1; }, 10, 4 );
woocommerce_gzd_shipments_packer_before_pack Action
$param_1
string$param_2
string
add_action( "woocommerce_gzd_shipments_packer_before_pack", function( $param_1, $param_2 ) { // Do something }, 10, 2 );
woocommerce_gzd_shipments_order_item_product Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_shipments_order_item_product", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_shipments_item_fits_packaging Filter
$param_1
string$param_2
string$param_3
string$param_4
string$param_5
string
add_filter( "woocommerce_gzd_shipments_item_fits_packaging", function( $param_1, $param_2, $param_3, $param_4, $param_5 ) { // Do something return $param_1; }, 10, 5 );
woocommerce_gzd_packing_item_keep_flat Filter
$param_1
bool$param_2
string
add_filter( "woocommerce_gzd_packing_item_keep_flat", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_packing_item_description Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_packing_item_description", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_packing_item_width_in_mm Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_packing_item_width_in_mm", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_packing_item_length_in_mm Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_packing_item_length_in_mm", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_packing_item_depth_in_mm Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_packing_item_depth_in_mm", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_packing_item_weight_in_g Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_packing_item_weight_in_g", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_packing_item_total_in_cents Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_packing_item_total_in_cents", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );
woocommerce_gzd_packing_item_subtotal_in_cents Filter
$param_1
string$param_2
string
add_filter( "woocommerce_gzd_packing_item_subtotal_in_cents", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );