• 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_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_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 );

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_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_product_safety_instructions_heading Filter

  1. $param string
add_filter( "woocommerce_gzd_product_safety_instructions_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_shipping_costs_notice Filter

  1. $param bool
add_filter( "woocommerce_gzd_show_mini_cart_totals_shipping_costs_notice", 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_product_classname Filter

Filter the classname for the Germanized product implementation.

  1. $classname string The classname.
  2. $type string The product type.
add_filter( "woocommerce_gzd_product_classname", function( $classname, $type ) {
    // Do something
    return $classname;    
}, 10, 2 );

woocommerce_gzd_rest_prepare_product Filter

Filter to adjust the REST response after preparing the product.

  1. $response \WP_REST_Response The response.
  2. $product \WC_Product The product object.
  3. $request \WP_REST_Request The request object.
add_filter( "woocommerce_gzd_rest_prepare_product", function( $response, $product, $request ) {
    // Do something
    return $response;    
}, 10, 3 );

woocommerce_gzd_rest_controller Filter

Filter to add new REST controller to Germanized.

  1. $controllers array The controller classes.
add_filter( "woocommerce_gzd_rest_controller", function( $controllers ) {
    // Do something
    return $controllers;    
}, 10, 1 );

woocommerce_gzd_template_check Filter

Filter to include certain packages or plugins while checking for outdated templates.

  1. $template_data array Template data in key => value pairs.
add_filter( "woocommerce_gzd_template_check", function( $template_data ) {
    // Do something
    return $template_data;    
}, 10, 1 );

woocommerce_gzd_sync_wp_privacy_page Filter

This filter is documented in includes/admin/class-wc-gzd-admin.php

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

woocommerce_gzd_after_resend_order_confirmation_email Action

Admin manual resend order confirmation email. This hook fires after a manual resend of the order confirmation email has been triggered.

  1. $order \WC_Order The order for which the confirmation email is sent.
  2. $mail_id string The email id (customer_processing_order).
add_action( "woocommerce_gzd_after_resend_order_confirmation_email", function( $order, $mail_id ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_admin_assets Action

After admin assets. This hook fires after Germanized has loaded and enqueued it’s admin assets.

  1. $this \WC_GZD_Admin The admin class.
add_action( "woocommerce_gzd_admin_assets", function( $this ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_deleted_text_options Action

After text options deletion. This hook fires after Germanized has deleted and re-installed it’s text options.

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

woocommerce_gzd_edit_product_food_panel Action

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

woocommerce_gzd_save_display_unit_price_data Filter

Filter to adjust unit price data before saving a product.

  1. $data array The unit price data.
  2. $product \WC_Product The product object.
add_filter( "woocommerce_gzd_save_display_unit_price_data", function( $data, $product ) {
    // Do something
    return $data;    
}, 10, 2 );

woocommerce_gzd_product_wp_editor_use_teeny Filter

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

woocommerce_gzd_product_saveable_data Filter

Filter that allows adjusting Germanized product data before saving.

  1. $data array Product data to be saved.
  2. $product \WC_Product The product object.
add_filter( "woocommerce_gzd_product_saveable_data", function( $data, $product ) {
    // Do something
    return $data;    
}, 10, 2 );