• Germanized
  • Hooks

Germanized Core

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

Filter to adjust the min or max variation regular unit price.

  1. $price string The price.
  2. $product \WC_GZD_Product_Variable The product object.
  3. $min_or_max string Either `min` or `max`.
  4. $display bool Either for display purposes or not.
add_filter( "woocommerce_gzd_get_variation_unit_regular_price", function( $price, $product, $min_or_max, $display ) {
    // Do something
    return $price;    
}, 10, 4 );

woocommerce_gzd_get_variation_unit_sale_price Filter

Filter to adjust the min or max variation sale unit price.

  1. $price string The price.
  2. $product \WC_GZD_Product_Variable The product object.
  3. $min_or_max string Either `min` or `max`.
  4. $display bool Either for display purposes or not.
add_filter( "woocommerce_gzd_get_variation_unit_sale_price", function( $price, $product, $min_or_max, $display ) {
    // Do something
    return $price;    
}, 10, 4 );

woocommerce_gzd_get_variation_unit_price Filter

Filter to adjust the min or max variation unit price.

  1. $price string The price.
  2. $product \WC_GZD_Product_Variable The product object.
  3. $min_or_max string Either `min` or `max`.
  4. $display bool Either for display purposes or not.
add_filter( "woocommerce_gzd_get_variation_unit_price", function( $price, $product, $min_or_max, $display ) {
    // Do something
    return $price;    
}, 10, 4 );

woocommerce_gzd_product_is_on_unit_sale Filter

Filter to decide whether a product is on unit sale or not.

  1. $on_sale bool Whether the product is on sale or not.
  2. $product \WC_GZD_Product The product object.
add_filter( "woocommerce_gzd_product_is_on_unit_sale", function( $on_sale, $product ) {
    // Do something
    return $on_sale;    
}, 10, 2 );

woocommerce_germanized_get_price_html_from_to Filter

Filter to adjust the HTML price range for unit prices.

  1. $price string The HTML price range.
  2. $from string The from price.
  3. $to string The to price.
  4. $product \WC_GZD_Product The product object.
add_filter( "woocommerce_germanized_get_price_html_from_to", function( $price, $from, $to, $product ) {
    // Do something
    return $price;    
}, 10, 4 );

woocommerce_gzd_before_get_unit_price_html Action

Before retrieving unit price HTML. Fires before the HTML output for the unit price is generated.

  1. $this \WC_GZD_Product The product object.
add_action( "woocommerce_gzd_before_get_unit_price_html", function( $this ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_variable_unit_price_html Filter

Filter to adjust variable 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_Variable The product object.
add_filter( "woocommerce_gzd_variable_unit_price_html", function( $price, $product ) {
    // Do something
    return $price;    
}, 10, 2 );

woocommerce_gzd_product_variable_show_unit_product_ranges Filter

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

woocommerce_gzd_hide_product_units_text Filter

Filter that allows disabling product units output for a specific product.

  1. $disable bool Whether to disable or not.
  2. $product \WC_GZD_Product The product object.
add_filter( "woocommerce_gzd_hide_product_units_text", function( $disable, $product ) {
    // Do something
    return $disable;    
}, 10, 2 );

woocommerce_germanized_disabled_product_units_text Filter

Filter that allows adjusting the disabled product units output.

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

woocommerce_gzd_product_single_product_unit_format Filter

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

woocommerce_gzd_product_unit_range_format Filter

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

woocommerce_gzd_product_units_html Filter

Filter to adjust the product units HTML output.

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

woocommerce_gzd_before_get_variable_variation_unit_price Action

Before retrieving variation unit price. Fires before a unit price for a certain variation is retrieved. May be useful for recalculation purposes.

  1. $ \WC_GZD_Product the variation product object.
add_action( "woocommerce_gzd_before_get_variable_variation_unit_price", function( $ ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_variation_unit_prices_price Filter

Filters the variation unit price.

  1. $price string The unit price.
  2. $product \WC_Product_Variation The product object.
  3. $parent \WC_GZD_Product_Variable The variable parent product object.
add_filter( "woocommerce_gzd_variation_unit_prices_price", function( $price, $product, $parent ) {
    // Do something
    return $price;    
}, 10, 3 );

woocommerce_gzd_variation_unit_prices_regular_price Filter

Filters the variation regular unit price.

  1. $price string The regular unit price.
  2. $product \WC_Product_Variation The product object.
  3. $parent \WC_GZD_Product_Variable The variable parent product object.
add_filter( "woocommerce_gzd_variation_unit_prices_regular_price", function( $price, $product, $parent ) {
    // Do something
    return $price;    
}, 10, 3 );

woocommerce_gzd_variation_unit_prices_sale_price Filter

Filters the variation sale unit price.

  1. $price string The sale unit price.
  2. $product \WC_Product_Variation The product object.
  3. $parent \WC_GZD_Product_Variable The variable parent product object.
add_filter( "woocommerce_gzd_variation_unit_prices_sale_price", function( $price, $product, $parent ) {
    // Do something
    return $price;    
}, 10, 3 );

woocommerce_gzd_variation_unit_prices Filter

Filter to adjust the unit prices for a certain variation right before returning. Last change to adjust unit prices before handing them over for further processing.

  1. $unit_prices array Array containing unit price data.
  2. $product \WC_GZD_Product_Variable The product object.
  3. $display bool Whether output is for display purposes or not.
add_filter( "woocommerce_gzd_variation_unit_prices", function( $unit_prices, $product, $display ) {
    // Do something
    return $unit_prices;    
}, 10, 3 );

woocommerce_gzd_get_variation_unit_prices_hash Filter

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

woocommerce_gzd_get_allergen_object Filter

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

woocommerce_gzd_show_product_review_authenticity_status Filter

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

woocommerce_gzd_show_product_rating_authenticity_status Filter

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

woocommerce_gzd_product_grid_block_price_xpath Filter

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

woocommerce_gzd_product_grid_block_title_xpath Filter

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

woocommerce_gzd_product_grid_block_rating_xpath Filter

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

woocommerce_gzd_product_types_supporting_unit_prices Filter

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

woocommerce_gzd_template_single_nutri_score Action

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

woocommerce_gzd_template_loop_nutri_score Action

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

woocommerce_gzd_checkout_table_needs_thumbnail Filter

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

woocommerce_gzd_checkout_table_thumbnail_wrapper Filter

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

woocommerce_gzd_before_add_variation_options Action

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

woocommerce_gzd_product_ingredients_heading Filter

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

woocommerce_gzd_product_allergenic_heading Filter

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

woocommerce_gzd_product_nutrients_heading Filter

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

woocommerce_gzd_product_manufacturer_heading Filter

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

woocommerce_gzd_product_safety_attachments_heading Filter

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

woocommerce_gzd_insert_order_submit_fallback Filter

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

woocommerce_gzd_show_pay_now_button Filter

Filter to allow disabling the pay now button.

  1. $show bool Whether to show or hide the button.
  2. $order_id int The order id.
add_filter( "woocommerce_gzd_show_pay_now_button", function( $show, $order_id ) {
    // Do something
    return $show;    
}, 10, 2 );

woocommerce_gzd_forwarding_fee_checkout_text Filter

Filter to adjust the forwarding fee checkout notice.

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

woocommerce_germanized_digital_delivery_time_text Filter

Filter to adjust delivery time text for digital products.

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

woocommerce_gzd_show_mini_cart_totals_taxes Filter

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

woocommerce_gzd_show_mini_cart_totals_differential_taxation_notice Filter

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

woocommerce_gzd_template_add_price_html_suffixes_args Filter

In some cases (e.g. product widgets) Germanized has to add legal information as a suffix because no other filters exist. This filter serves to decide which info to append and in which order.

  1. $args array The data to be appended.
  2. $location string The location e.g. product_widget.
add_filter( "woocommerce_gzd_template_add_price_html_suffixes_args", function( $args, $location ) {
    // Do something
    return $args;    
}, 10, 2 );

woocommerce_gzd_template_add_price_html_suffix Filter

Filter that allows adjusting the HTML suffix for product widgets.

  1. $html string The suffix.
  2. $args array The data which was appended.
  3. $location string The location.
add_filter( "woocommerce_gzd_template_add_price_html_suffix", function( $html, $args, $location ) {
    // Do something
    return $html;    
}, 10, 3 );

woocommerce_gzd_maybe_flush_cache Action

Flush cache action. Trigger the flush cache action to indicate that Germanized wants to flush the cache.

  1. $type string Cache type e.g. db.
  2. $cache_args array Additional arguments.
add_action( "woocommerce_gzd_maybe_flush_cache", function( $type, $cache_args ) {
    // Do something
        
}, 10, 2 );