• 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_germanized_before_load Action

Before startup. This hook fires right before Germanized includes relevant files for startup.

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

woocommerce_germanized_loaded Action

After startup. This hook fires right after all relevant files for Germanized has been loaded.

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

woocommerce_germanized_init Action

Initialized Germanized This hook fires after Germanized has been initialized e.g. textdomain has been loaded and relevant have been placed.

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

woocommerce_gzd_template_path Filter

Filter the default Germanized template path folder. “`php function ex_filter_template_path( $path ) { return ‘woocommerce-germanized-test/’; } add_filter( ‘woocommerce_gzd_template_path’, ‘ex_filter_template_path’, 10, 1 ); “`

  1. $path string The relative path within your theme directory.
add_filter( "woocommerce_gzd_template_path", function( $path ) {
    // Do something
    return $path;    
}, 10, 1 );

woocommerce_gzd_compatibilities Filter

Filter compatibility classes. This filter allows third party developers to register compatibility scripts for certain plugins. Make sure to include your class accordingly before adding your script.

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

woocommerce_gzd_theme_compatibilities Filter

Filter theme compatibility classes. This filter allows third party developers to register compatibility scripts for certain themes. Make sure to include your class accordingly before adding your script.

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

woocommerce_gzd_templates_requiring_variation_script Filter

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

woocommerce_gzd_template_name Filter

Filters the template name.

  1. $template_name string The template name e.g. checkboxes/default.php
add_filter( "woocommerce_gzd_template_name", function( $template_name ) {
    // Do something
    return $template_name;    
}, 10, 1 );

woocommerce_gzd_default_plugin_template Filter

Filter the default plugin template file. This file is being loaded as a default template if no theme template was found.

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

woocommerce_germanized_filter_template Filter

Filters the actual loaded template. This filter allows filtering the located template path (whether theme or plugin).

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

woocommerce_gzd_important_templates Filter

Filters critical template which should be prevented from overriding.

  1. $templates array Array containing the template names.
add_filter( "woocommerce_gzd_important_templates", function( $templates ) {
    // Do something
    return $templates;    
}, 10, 1 );

woocommerce_gzd_refresh_unit_price_on_price_change Filter

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

woocommerce_gzd_registered_scripts Action

Register frontend scripts and styles. This hook executes right after Germanized has registered and enqueued relevant scripts and styles for the frontend.

  1. $suffix string The asset suffix e.g. .min in non-debugging mode.
  2. $frontend_script_path string The absolute URL to the plugins JS files.
  3. $assets_path string The absolute URL to the plugins asset files.
add_action( "woocommerce_gzd_registered_scripts", function( $suffix, $frontend_script_path, $assets_path ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_deposit_packaging_type_font_size_css Filter

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

woocommerce_gzd_add_to_cart_variation_params Filter

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

wc_gzd_revocation_params Filter

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

woocommerce_gzd_unit_price_observer_price_selectors Filter

Allow multiple price selectors to be observed

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

woocommerce_gzd_unit_price_observer_params Filter

Filters script localization paramaters for the `wc-gzd-unit-price-observer` script.

  1. $params array Key => value array containing parameter name and value.
add_filter( "woocommerce_gzd_unit_price_observer_params", function( $params ) {
    // Do something
    return $params;    
}, 10, 1 );

wc_gzd_force_pay_order_params Filter

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

woocommerce_gzd_voucher_name Filter

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

wc_gzd_cart_voucher_params Filter

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

wc_gzd_checkout_params Filter

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

woocommerce_gzd_localized_scripts Action

Localized scripts. This hook fires after Germanized has localized it’s scripts.

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

woocommerce_germanized_email_template_hook Filter

Filters email templates.

  1. $core_file string The core template file.
  2. $template string The template name.
  3. $template_base string The template base folder.
add_filter( "woocommerce_germanized_email_template_hook", function( $core_file, $template, $template_base ) {
    // Do something
    return $core_file;    
}, 10, 3 );

woocommerce_gzd_voucher_order_allow_fee_reduction Filter

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

woocommerce_gzd_voucher_includes_shipping_costs Filter

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

woocommerce_gzd_voucher_cart_allow_fee_reduction Filter

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

woocommerce_gzd_voucher Filter

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

woocommerce_gzd_order_coupon_tax_display_mode Filter

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

woocommerce_gzd_coupon_is_voucher Filter

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

woocommerce_gzd_order_item_coupon_is_voucher Filter

  1. $param_1 string
  2. $param_2 string
  3. $param_3 string
add_filter( "woocommerce_gzd_order_item_coupon_is_voucher", 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_shortcode_product_unit_price_html Filter

Filter shortcode product unit price output.

  1. $html string The output.
  2. $atts array The shortcode arguments.
add_filter( "woocommerce_gzd_shortcode_product_unit_price_html", function( $html, $atts ) {
    // Do something
    return $html;    
}, 10, 2 );

woocommerce_gzd_shortcode_product_units_html Filter

Filter shortcode product unit output.

  1. $html string The output.
  2. $atts array The shortcode arguments.
add_filter( "woocommerce_gzd_shortcode_product_units_html", function( $html, $atts ) {
    // Do something
    return $html;    
}, 10, 2 );

woocommerce_gzd_shortcode_product_delivery_time_html Filter

Filter shortcode product delivery time output.

  1. $html string The output.
  2. $atts array The shortcode arguments.
add_filter( "woocommerce_gzd_shortcode_product_delivery_time_html", function( $html, $atts ) {
    // Do something
    return $html;    
}, 10, 2 );

woocommerce_gzd_shortcode_product_tax_notice_html Filter

Filter shortcode product tax notice output.

  1. $html string The output.
  2. $atts array The shortcode arguments.
add_filter( "woocommerce_gzd_shortcode_product_tax_notice_html", function( $html, $atts ) {
    // Do something
    return $html;    
}, 10, 2 );

woocommerce_gzd_shortcode_product_shipping_notice_html Filter

Filter shortcode product shipping notice output.

  1. $html string The output.
  2. $atts array The shortcode arguments.
add_filter( "woocommerce_gzd_shortcode_product_shipping_notice_html", function( $html, $atts ) {
    // Do something
    return $html;    
}, 10, 2 );

woocommerce_gzd_shortcode_product_defect_description_html Filter

Filter shortcode product defect description output.

  1. $html string The output.
  2. $atts array The shortcode arguments.
add_filter( "woocommerce_gzd_shortcode_product_defect_description_html", function( $html, $atts ) {
    // Do something
    return $html;    
}, 10, 2 );

woocommerce_gzd_shortcode_product_deposit_html Filter

Filter shortcode product deposit output.

  1. $html string The output.
  2. $atts array The shortcode arguments.
add_filter( "woocommerce_gzd_shortcode_product_deposit_html", function( $html, $atts ) {
    // Do something
    return $html;    
}, 10, 2 );

woocommerce_gzd_shortcode_product_food_html Filter

Filter shortcode product food output.

  1. $html string The output.
  2. $atts array The shortcode arguments.
  3. $param_3 string
add_filter( "woocommerce_gzd_shortcode_product_food_html", function( $html, $atts, $param_3 ) {
    // Do something
    return $html;    
}, 10, 3 );

woocommerce_gzd_shortcode_product_deposit_packaging_type_html Filter

Filter shortcode product deposit packaging type output.

  1. $html string The output.
  2. $atts array The shortcode arguments.
add_filter( "woocommerce_gzd_shortcode_product_deposit_packaging_type_html", function( $html, $atts ) {
    // Do something
    return $html;    
}, 10, 2 );

woocommerce_germanized_taxonomy_objects_product_delivery_time Filter

Filter post types which are capable of storing delivery times.

  1. $post_types array The post types to support `delivery_time` taxonomy.
add_filter( "woocommerce_germanized_taxonomy_objects_product_delivery_time", function( $post_types ) {
    // Do something
    return $post_types;    
}, 10, 1 );

woocommerce_germanized_taxonomy_args_product_delivery_time Filter

Filter to adjust arguments passed to register the `delivery_time` taxonomy.

  1. $args array Arguments passed to `register_taxonomy`.
add_filter( "woocommerce_germanized_taxonomy_args_product_delivery_time", function( $args ) {
    // Do something
    return $args;    
}, 10, 1 );

woocommerce_germanized_taxonomy_objects_product_unit Filter

Filter post types which are capable of storing units.

  1. $post_types array The post types to support `product_unit` taxonomy.
add_filter( "woocommerce_germanized_taxonomy_objects_product_unit", function( $post_types ) {
    // Do something
    return $post_types;    
}, 10, 1 );

woocommerce_germanized_taxonomy_args_product_unit Filter

Filter to adjust arguments passed to register the `product_unit` taxonomy.

  1. $args array Arguments passed to `register_taxonomy`.
add_filter( "woocommerce_germanized_taxonomy_args_product_unit", function( $args ) {
    // Do something
    return $args;    
}, 10, 1 );

woocommerce_germanized_taxonomy_objects_product_price_label Filter

Filter post types which are capable of storing price labels.

  1. $post_types array The post types to support `price_label` taxonomy.
add_filter( "woocommerce_germanized_taxonomy_objects_product_price_label", function( $post_types ) {
    // Do something
    return $post_types;    
}, 10, 1 );

woocommerce_germanized_taxonomy_args_product_price_label Filter

Filter to adjust arguments passed to register the `price_label` taxonomy.

  1. $args array Arguments passed to `register_taxonomy`.
add_filter( "woocommerce_germanized_taxonomy_args_product_price_label", function( $args ) {
    // Do something
    return $args;    
}, 10, 1 );

woocommerce_germanized_taxonomy_objects_product_deposit_type Filter

Filter post types which are capable of storing deposit types.

  1. $post_types array The post types to support `product_deposit_type` taxonomy.
add_filter( "woocommerce_germanized_taxonomy_objects_product_deposit_type", function( $post_types ) {
    // Do something
    return $post_types;    
}, 10, 1 );

woocommerce_germanized_taxonomy_args_product_deposit_type Filter

Filter to adjust arguments passed to register the `product_deposit_type` taxonomy.

  1. $args array Arguments passed to `register_taxonomy`.
add_filter( "woocommerce_germanized_taxonomy_args_product_deposit_type", function( $args ) {
    // Do something
    return $args;    
}, 10, 1 );