• Germanized
  • Hooks

Germanized Core

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

  1. $param_1 bool
  2. $param_2 string
add_filter( "woocommerce_gzd_get_nutrient_object", function( $param_1, $param_2 ) {
    // Do something
    return $param_1;    
}, 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_manufacturer Filter

Filter post types which are capable of storing manufacturers.

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

woocommerce_germanized_taxonomy_args_product_manufacturer Filter

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

  1. $args array Arguments passed to `register_taxonomy`.
add_filter( "woocommerce_germanized_taxonomy_args_product_manufacturer", 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_gzd_register_food_taxonomies Filter

  1. $param string
add_filter( "woocommerce_gzd_register_food_taxonomies", function( $param ) {
    // Do something
    return $param;    
}, 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 );

woocommerce_gzd_show_food_ui Filter

  1. $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.

  1. $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.

  1. $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.

  1. $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.

  1. $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_get_term Action

Before retrieving a certain term. Executes before retrieving a certain term (e.g. a delivery time).

  1. $key string The identifier e.g. term slug.
  2. $by string Indicates how to identify the term e.g. by slug.
  3. $taxonomy string The taxonomy linked to the term e.g. delivery_time.
add_action( "woocommerce_gzd_get_term", function( $key, $by, $taxonomy ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_after_get_term Action

After retrieving a certain term. Executes after retrieving a certain term (e.g. a delivery time).

  1. $key string The identifier e.g. term slug.
  2. $by string Indicates how to identify the term e.g. by slug.
  3. $taxonomy string The taxonomy linked to the term e.g. delivery_time.
add_action( "woocommerce_gzd_after_get_term", function( $key, $by, $taxonomy ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_get_product_{$prop} Filter

Filter to adjust a certain product property e.g. unit_price. The dynamic portion of the hook name, `$prop` refers to the product property e.g. unit_price.

  1. $value mixed The property value.
  2. $gzd_product \WC_GZD_Product The GZD product instance.
  3. $product \WC_Product The product instance.
  4. $context string

woocommerce_gzd_get_product_nutrients Filter

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

woocommerce_gzd_get_product_nutrients_html Filter

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

woocommerce_gzd_get_product_allergenic Filter

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

woocommerce_gzd_get_product_formatted_allergenic Filter

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

woocommerce_gzd_product_formatted_nutri_score Filter

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

woocommerce_gzd_product_net_filling_quantity_unit Filter

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

woocommerce_gzd_product_formatted_net_filling_quantity Filter

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

woocommerce_gzd_drain_weight_unit Filter

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

woocommerce_gzd_product_formatted_drain_weight Filter

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

woocommerce_gzd_product_includes_alcohol Filter

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

woocommerce_gzd_product_has_safety_information Filter

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

woocommerce_gzd_product_manufacturer_html Filter

Filter to adjust product manufacturer html output.

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

woocommerce_gzd_product_safety_attachments_html Filter

Filter to adjust product safety attachments html output.

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

woocommerce_gzd_product_deposit_packaging_type Filter

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

woocommerce_gzd_product_deposit_packaging_type_title Filter

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

woocommerce_gzd_shipping_country_skips_deposit Filter

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

woocommerce_gzd_product_deposit_amount Filter

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

woocommerce_gzd_deposit_amount_including_tax Filter

Filter to adjust the deposit amount including tax.

  1. $deposit_amount string The calculated deposit amount.
  2. $price string The price passed.
  3. $qty int The quantity.
  4. $product \WC_GZD_Product The product object.
add_filter( "woocommerce_gzd_deposit_amount_including_tax", function( $deposit_amount, $price, $qty, $product ) {
    // Do something
    return $deposit_amount;    
}, 10, 4 );

woocommerce_gzd_deposit_amount_excluding_tax Filter

Filter to adjust the deposit amount excluding tax.

  1. $deposit_amount string The calculated deposit amount.
  2. $price string The price passed.
  3. $qty int The quantity.
  4. $product \WC_GZD_Product The product object.
add_filter( "woocommerce_gzd_deposit_amount_excluding_tax", function( $deposit_amount, $price, $qty, $product ) {
    // Do something
    return $deposit_amount;    
}, 10, 4 );

woocommerce_gzd_product_deposit_amount_per_unit Filter

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