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_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 ); “`
$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.
$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.
$param
array
add_filter( "woocommerce_gzd_theme_compatibilities", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_templates_requiring_variation_script Filter
$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.
$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.
$param_1
string$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).
$param_1
string$param_2
string$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.
$templates
array Array containing the template names.
add_filter( "woocommerce_gzd_important_templates", function( $templates ) { // Do something return $templates; }, 10, 1 );
woocommerce_gzd_force_de_language Filter
$param
string
add_filter( "woocommerce_gzd_force_de_language", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_refresh_unit_price_on_price_change Filter
$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.
$suffix
string The asset suffix e.g. .min in non-debugging mode.$frontend_script_path
string The absolute URL to the plugins JS files.$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
$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
$param
array
add_filter( "woocommerce_gzd_add_to_cart_variation_params", function( $param ) { // Do something return $param; }, 10, 1 );
wc_gzd_revocation_params Filter
$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
$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.
$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
$param
array
add_filter( "wc_gzd_force_pay_order_params", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_gzd_voucher_name Filter
$param_1
string$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
$param
string
add_filter( "wc_gzd_cart_voucher_params", function( $param ) { // Do something return $param; }, 10, 1 );
wc_gzd_checkout_params Filter
$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.
$core_file
string The core template file.$template
string The template name.$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_germanized_taxonomy_objects_product_delivery_time Filter
Filter post types which are capable of storing delivery times.
$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.
$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.
$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.
$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.
$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.
$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.
$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.
$args
array Arguments passed to `register_taxonomy`.
add_filter( "woocommerce_germanized_taxonomy_args_product_deposit_type", function( $args ) { // Do something return $args; }, 10, 1 );
woocommerce_gzd_show_food_ui Filter
$param
bool
add_filter( "woocommerce_gzd_show_food_ui", function( $param ) { // Do something return $param; }, 10, 1 );
woocommerce_germanized_taxonomy_objects_product_nutrient Filter
Filter post types which are capable of storing deposit types.
$post_types
array The post types to support `product_nutrient` taxonomy.
add_filter( "woocommerce_germanized_taxonomy_objects_product_nutrient", function( $post_types ) { // Do something return $post_types; }, 10, 1 );
woocommerce_germanized_taxonomy_args_product_nutrient Filter
Filter to adjust arguments passed to register the `product_nutrient` taxonomy.
$args
array Arguments passed to `register_taxonomy`.
add_filter( "woocommerce_germanized_taxonomy_args_product_nutrient", function( $args ) { // Do something return $args; }, 10, 1 );
woocommerce_germanized_taxonomy_objects_product_allergen Filter
Filter post types which are capable of storing allergenic.
$post_types
array The post types to support `product_allergen` taxonomy.
add_filter( "woocommerce_germanized_taxonomy_objects_product_allergen", function( $post_types ) { // Do something return $post_types; }, 10, 1 );
woocommerce_germanized_taxonomy_args_product_allergen Filter
Filter to adjust arguments passed to register the `product_allergen` taxonomy.
$args
array Arguments passed to `register_taxonomy`.
add_filter( "woocommerce_germanized_taxonomy_args_product_allergen", function( $args ) { // Do something return $args; }, 10, 1 );
woocommerce_gzd_check_virtual_vat_exempt Filter
$param_1
bool$param_2
string$param_3
string
add_filter( "woocommerce_gzd_check_virtual_vat_exempt", function( $param_1, $param_2, $param_3 ) { // Do something return $param_1; }, 10, 3 );
woocommerce_gzd_force_tax_location_vat_base_rates Filter
Filter to adjust whether virtual VAT is applicable or not. If set to true, Germanized will return tax rates based on the user country.
$virtual_vat_applicable
bool Whether virtual VAT rates are applicable or not.$tax_class
string The tax class.$location
array The tax location data.
add_filter( "woocommerce_gzd_force_tax_location_vat_base_rates", function( $virtual_vat_applicable, $tax_class, $location ) { // Do something return $virtual_vat_applicable; }, 10, 3 );
woocommerce_gzd_voucher_includes_shipping_costs Filter
$param_1
string$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
$param_1
bool$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_order_allow_fee_reduction Filter
$param_1
bool$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_updated Action
Plugin updated. Germanized was updated to a new version.
add_action( "woocommerce_gzd_updated", function( ) { // Do something }, 10 );
woocommerce_gzd_needs_db_update Filter
Decides whether Germanized needs a database update.
$
bool Whether a database update is needed or not.
add_filter( "woocommerce_gzd_needs_db_update", function( $ ) { // Do something return $; }, 10, 1 );
woocommerce_gzd_installed Action
Plugin installed. Germanized was installed successfully.
add_action( "woocommerce_gzd_installed", function( ) { // Do something }, 10 );
woocommerce_gzd_db_update Action
Runs as soon as a database update has been triggered by the user.
add_action( "woocommerce_gzd_db_update", function( ) { // Do something }, 10 );
woocommerce_gzd_create_pages Filter
Filter to add/edit pages to be created on install.
$pages
array Array containing page data.
add_filter( "woocommerce_gzd_create_pages", function( $pages ) { // Do something return $pages; }, 10, 1 );
woocommerce_gzd_installation_default_settings Filter
Filter to adjust default options to be created on install.
$settings
array The settings to be added as wp_option on install.
add_filter( "woocommerce_gzd_installation_default_settings", function( $settings ) { // Do something return $settings; }, 10, 1 );
woocommerce_gzd_get_allergen_object Filter
$param_1
bool$param_2
string
add_filter( "woocommerce_gzd_get_allergen_object", function( $param_1, $param_2 ) { // Do something return $param_1; }, 10, 2 );