• Germanized
  • Hooks

Germanized Core

A list of Hooks available in Germanized Core. Please mind that dynamic hooks, e.g. Hooks created based on specific object types might not be part of this list.

woocommerce_gzd_dependencies_instance Filter

This filter is documented in woocommerce-germanized.php

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

woocommerce_gzd_instant_order_confirmation Filter

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

woocommerce_gzd_age_verification_min_ages Filter

Returns minimum age options. This filter might be used to adjust the minimum age options available to choose from e.g. on product level. “`php function ex_filter_add_min_ages( $ages ) { $ages[14] = ‘>= 14 years’; return $ages; } add_filter( ‘woocommerce_gzd_age_verification_min_ages’, ‘ex_filter_add_min_ages’, 10, 1 ); “`

  1. $ages array Array containing age => value elements.
add_filter( "woocommerce_gzd_age_verification_min_ages", function( $ages ) {
    // Do something
    return $ages;    
}, 10, 1 );

woocommerce_gzd_formatted_alcohol_content Filter

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

woocommerce_gzd_formatted_food_attribute_value Filter

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

woocommerce_gzd_food_attribute_trim_zeros Filter

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

woocommerce_gzd_small_business_notice Filter

Filter the (global) small business notice.

  1. $html string The notice HTML.
add_filter( "woocommerce_gzd_small_business_notice", function( $html ) {
    // Do something
    return $html;    
}, 10, 1 );

woocommerce_gzd_differential_taxation_notice_text_mark Filter

Filters the general differential taxation notice mark.

  1. $notice string The notice mark, e.g. `*`.
add_filter( "woocommerce_gzd_differential_taxation_notice_text_mark", function( $notice ) {
    // Do something
    return $notice;    
}, 10, 1 );

woocommerce_gzd_differential_taxation_notice_text_checkout Filter

Filter to adjust the differential taxation notice text during checkout.

  1. $html string The notice.
add_filter( "woocommerce_gzd_differential_taxation_notice_text_checkout", function( $html ) {
    // Do something
    return $html;    
}, 10, 1 );

woocommerce_gzd_shipping_method_id_matches_supported Filter

Filter to check whether a certain shipping method id matches one of the shipping method expected (e.g. from the settings).

  1. $return bool Whether the method id matches one of the expected methods or not.
  2. $method_id string The shipping method id.
  3. $supported array The shipping method ids to search for.
add_filter( "woocommerce_gzd_shipping_method_id_matches_supported", function( $return, $method_id, $supported ) {
    // Do something
    return $return;    
}, 10, 3 );

woocommerce_gzd_enable_parcel_delivery_data_transfer_checkbox Filter

Filter that allows adjusting whether to show the parcel delivery data transfer checkbox or not for rate ids.

  1. $return bool Whether to display the checkbox or not.
  2. $rate_ids array Shipping rate ids to check against.
add_filter( "woocommerce_gzd_enable_parcel_delivery_data_transfer_checkbox", function( $return, $rate_ids ) {
    // Do something
    return $return;    
}, 10, 2 );

woocommerce_gzd_show_taxes_before_total Filter

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

woocommerce_gzd_tax_rate_label Filter

Allow adjusting the tax rate label e.g. “incl. 19% tax”.

  1. $label string The label.
  2. $rate_percentage int The percentage e.g. 19.
  3. $param_3 string
add_filter( "woocommerce_gzd_tax_rate_label", function( $label, $rate_percentage, $param_3 ) {
    // Do something
    return $label;    
}, 10, 3 );

woocommerce_gzd_order_tax_rate_percentage Filter

Allow adjusting the order tax rate percentage for a certain tax rate id.

  1. $percentage int The percentage e.g. 19.
  2. $tax_rate_id int The tax rate id.
  3. $order \WC_Order The order object
add_filter( "woocommerce_gzd_order_tax_rate_percentage", function( $percentage, $tax_rate_id, $order ) {
    // Do something
    return $percentage;    
}, 10, 3 );

woocommerce_gzd_shipping_costs_text Filter

Filter to adjust the shipping costs legal text for a certain product.

  1. $html string The notice output.
  2. $product \WC_GZD_Product The product object.
add_filter( "woocommerce_gzd_shipping_costs_text", function( $html, $product ) {
    // Do something
    return $html;    
}, 10, 2 );

woocommerce_gzd_shipping_costs_cart_text Filter

Filter to adjust the shipping costs legal text during cart, checkout and orders.

  1. $html string The notice output.
add_filter( "woocommerce_gzd_shipping_costs_cart_text", function( $html ) {
    // Do something
    return $html;    
}, 10, 1 );

woocommerce_gzd_differential_taxation_notice_text Filter

Filter to adjust the differential taxation notice text.

  1. $html string The notice.
add_filter( "woocommerce_gzd_differential_taxation_notice_text", function( $html ) {
    // Do something
    return $html;    
}, 10, 1 );

woocommerce_gzd_privacy_policy_page_id Filter

Filter to adjust the Germanized privacy page id.

  1. $page_id int The page id.
add_filter( "woocommerce_gzd_privacy_policy_page_id", function( $page_id ) {
    // Do something
    return $page_id;    
}, 10, 1 );

woocommerce_gzd_title_options Filter

Filter default customer title options e.g. Mr. or Ms. “`php function ex_adjust_title_options( $titles ) { // Add a extra title option $titles[3] = __( ‘Neutral’, ‘my-text-domain’ ); return $titles; } add_filter( ‘woocommerce_gzd_title_options’, ‘ex_adjust_title_options’, 10, 1 ); “`

  1. $titles array Array containing title selection options.
add_filter( "woocommerce_gzd_title_options", function( $titles ) {
    // Do something
    return $titles;    
}, 10, 1 );

woocommerce_gzd_customer_formatted_title Filter

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

woocommerce_gzd_show_variable_more_variants_notice Filter

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

woocommerce_gzd_variable_more_variants_notice_text Filter

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

woocommerce_gzd_adjust_price_range_format Filter

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

woocommerce_gzd_price_range_format Filter

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

woocommerce_gzd_unit_price_range_format Filter

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

woocommerce_gzd_switch_email_locale Action

  1. $param_1 string
  2. $param_2 string
add_action( "woocommerce_gzd_switch_email_locale", function( $param_1, $param_2 ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_restore_email_locale Action

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

woocommerce_gzd_unit_base_hide_amount Filter

Filter that allows changing the amount which is used to determine whether the base for the unit price should be skipped or not. Defaults to 1.

  1. $amount int The amount.
add_filter( "woocommerce_gzd_unit_base_hide_amount", function( $amount ) {
    // Do something
    return $amount;    
}, 10, 1 );

woocommerce_gzd_formatted_deposit_price Filter

Filter to adjust the formatted deposit amount.

  1. $html string The html output
  2. $price string The price html
  3. $args array Additional arguments
add_filter( "woocommerce_gzd_formatted_deposit_price", function( $html, $price, $args ) {
    // Do something
    return $html;    
}, 10, 3 );

wc_gzd_unit_price_base_seperator Filter

Filter to adjust the unit price base separator.

  1. $separator string The separator.
add_filter( "wc_gzd_unit_price_base_seperator", function( $separator ) {
    // Do something
    return $separator;    
}, 10, 1 );

wc_gzd_unit_price_seperator Filter

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

woocommerce_gzd_formatted_unit_price Filter

Filter to adjust the formatted unit price.

  1. $html string The html output
  2. $price string The price html
  3. $unit_base string The unit base html
  4. $unit string The unit html
add_filter( "woocommerce_gzd_formatted_unit_price", function( $html, $price, $unit_base, $unit ) {
    // Do something
    return $html;    
}, 10, 4 );

woocommerce_gzd_additional_costs_include_tax Filter

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

woocommerce_gzd_order_defect_descriptions Filter

Returns a list of defect descriptions on a per product base.

  1. $descriptions string[] The defect descriptions as key => value pairs.
  2. $items array The order items.
add_filter( "woocommerce_gzd_order_defect_descriptions", function( $descriptions, $items ) {
    // Do something
    return $descriptions;    
}, 10, 2 );

woocommerce_gzd_cart_defect_descriptions Filter

Returns a list of defect descriptions on a per product base.

  1. $descriptions string[] The defect descriptions as key => value pairs.
  2. $items array The cart items.
add_filter( "woocommerce_gzd_cart_defect_descriptions", function( $descriptions, $items ) {
    // Do something
    return $descriptions;    
}, 10, 2 );

woocommerce_gzd_update_page_content Filter

  1. $param_1 string
  2. $param_2 string
  3. $param_3 string
  4. $param_4 string
  5. $param_5 string
  6. $param_6 string
add_filter( "woocommerce_gzd_update_page_content", function( $param_1, $param_2, $param_3, $param_4, $param_5, $param_6 ) {
    // Do something
    return $param_1;    
}, 10, 6 );

woocommerce_gzd_item_defect_descriptions_separator Filter

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

woocommerce_gzd_before_get_post_plain_content Action

  1. $param_1 string
  2. $param_2 string
add_action( "woocommerce_gzd_before_get_post_plain_content", function( $param_1, $param_2 ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_after_get_post_plain_content Action

  1. $param_1 string
  2. $param_2 string
add_action( "woocommerce_gzd_after_get_post_plain_content", function( $param_1, $param_2 ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_post_plain_content Filter

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

woocommerce_gzd_base_country_supports_photovoltaic_system_vat_exempt Filter

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

woocommerce_gzd_allow_b2b_photovoltaic_system_vat_exemption Filter

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

woocommerce_gzd_customer_applies_for_photovoltaic_system_vat_exemption Filter

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

woocommerce_gzd_shipping_country_supports_photovoltaic_system_vat_exempt Filter

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

woocommerce_gzd_hide_delivery_time_for_grouped_product Filter

Filter that decides whether to hide delivery time for grouped products or not.

  1. $hide bool Whether to hide delivery time or not.
  2. $product \WC_GZD_Product_Grouped The product object.
add_filter( "woocommerce_gzd_hide_delivery_time_for_grouped_product", function( $hide, $product ) {
    // Do something
    return $hide;    
}, 10, 2 );

woocommerce_gzd_grouped_unit_price_html Filter

Filter to adjust grouped product unit price. In case of Woo version > 3.0.0 this filter can contain the formatted sale price too.

  1. $price string The price.
  2. $product \WC_GZD_Product_Grouped The product object.
add_filter( "woocommerce_gzd_grouped_unit_price_html", function( $price, $product ) {
    // Do something
    return $price;    
}, 10, 2 );

woocommerce_gzd_unit_price_html Filter

Filter to adjust the product’s unit price HTML output.

  1. $html string The unit price as HTML.
  2. $product \WC_GZD_Product The product object.
  3. $param_3 string
add_filter( "woocommerce_gzd_unit_price_html", function( $html, $product, $param_3 ) {
    // Do something
    return $html;    
}, 10, 3 );

woocommerce_gzd_order_main_service_tax_class Filter

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