• Germanized
  • Hooks

Germanized Core

woocommerce_gzd_nutrient_types Filter

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

woocommerce_gzd_nutrient_rounding_rules Filter

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

woocommerce_gzd_small_business_product_notice Filter

Filter to adjust the small business product notice.

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

woocommerce_gzd_digital_product_types Filter

Filter to allow adjusting which product types are considered digital types. Digital product types are used to check whether a possible revocation exempt exists or not.

  1. $types array The product types.
add_filter( "woocommerce_gzd_digital_product_types", function( $types ) {
    // Do something
    return $types;    
}, 10, 1 );

woocommerce_gzd_product_is_revocation_exempt Filter

Filter that allows adjusting whether a certain product is a revocation exempt in terms of a certain type (e.g. digital or service).

  1. $is_exempt bool Whether the product is an exempt or not.
  2. $product \WC_Product The product object.
  3. $type string The exempt type e.g. digital or service.
  4. $context_object object E.g. the cart item or order item
add_filter( "woocommerce_gzd_product_is_revocation_exempt", function( $is_exempt, $product, $type, $context_object ) {
    // Do something
    return $is_exempt;    
}, 10, 4 );

woocommerce_gzd_recalculated_unit_prices Filter

Filter to adjust unit price after a recalculation happened.

  1. $prices array The price data.
  2. $product \WC_GZD_Product The product object.
  3. $args array Additional arguments.
add_filter( "woocommerce_gzd_recalculated_unit_prices", function( $prices, $product, $args ) {
    // Do something
    return $prices;    
}, 10, 3 );

woocommerce_gzd_product_review_is_verified Filter

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

woocommerce_gzd_product_rating_is_verified Filter

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

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

wc_gzd_frontend_hook_priority Filter

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

woocommerce_gzd_hook_priority_cache_duration Filter

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

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

Filter to adjust the deposit packaging type title for an order item.

  1. $title string The title.
  2. $order_item \WC_GZD_Order_Item_Product The order item product object.
add_filter( "woocommerce_gzd_order_item_product_deposit_packaging_type_title", function( $title, $order_item ) {
    // Do something
    return $title;    
}, 10, 2 );

woocommerce_gzd_order_item_product_units_html Filter

Filter to adjust the product units HTML output.

  1. $html string The HTML output.
  2. $order_item \WC_GZD_Order_Item_Product The order item product object.
add_filter( "woocommerce_gzd_order_item_product_units_html", function( $html, $order_item ) {
    // Do something
    return $html;    
}, 10, 2 );

woocommerce_gzd_order_item_quantity Filter

Determines the quantity used to calculate the item total used for unit price (re-) calculation for an order item.

  1. $quantity float The item quantity.
  2. $gzd_order_item \WC_GZD_Order_Item_Product Germanized order item instance.
  3. $order_item \WC_Order_Item_Product The order item instance.
add_filter( "woocommerce_gzd_order_item_quantity", function( $quantity, $gzd_order_item, $order_item ) {
    // Do something
    return $quantity;    
}, 10, 3 );

woocommerce_gzd_recalculate_order_item_unit_price Action

Order item unit price recalculation This action fires before recalculating unit price for a certain order item (e.g. when taxes are recalculated).

  1. $order_item \WC_Order_Item_Product
  2. $gzd_order_item \WC_GZD_Order_Item_Product
add_action( "woocommerce_gzd_recalculate_order_item_unit_price", function( $order_item, $gzd_order_item ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_email_attachment_content_shortcodes_allowed Filter

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

woocommerce_gzd_before_get_email_meta_plain_content Action

Hook that executes after retrieving legal page content from the optional meta field `_legal_text` that may be used to use a differing text as legal attachment.

  1. $post \WP_Post
add_action( "woocommerce_gzd_before_get_email_meta_plain_content", function( $post ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_apply_optional_content_filter_email_attachment Filter

Filter that allows disabling the `the_content` filter for optional legal page content.

  1. $enable bool Enable or disable the `the_content` filter.
  2. $content string The content.
  3. $param_3 string
add_filter( "woocommerce_gzd_apply_optional_content_filter_email_attachment", function( $enable, $content, $param_3 ) {
    // Do something
    return $enable;    
}, 10, 3 );

woocommerce_gzd_email_plain_content Filter

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

woocommerce_gzd_product_warranties_email_product_ids Filter

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

woocommerce_gzd_reset_email_instance Action

  1. $param string
add_action( "woocommerce_gzd_reset_email_instance", function( $param ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_current_email_instance Filter

Filters the current email instance (e.g. while sending an email) determined by Germanized. This instance is being used to check whether to attach legal texts to this email or not.

  1. $email bool|\WC_Email The current email instance.
  2. $email_helper \WC_GZD_Emails The email helper instance.
add_filter( "woocommerce_gzd_current_email_instance", function( $email, $email_helper ) {
    // Do something
    return $email;    
}, 10, 2 );

woocommerce_gzd_pay_for_order_request_needs_confirmation Filter

Filter to decide whether a pay for order request needs email confirmation or not.

  1. $needs_confirmation bool Needs confirmation or not.
  2. $order \WC_Order The order instance
add_filter( "woocommerce_gzd_pay_for_order_request_needs_confirmation", function( $needs_confirmation, $order ) {
    // Do something
    return $needs_confirmation;    
}, 10, 2 );

woocommerce_gzd_admin_email_order_confirmation_text_option Filter

Filter order confirmation text option field.

  1. $args array Text option arguments.
add_filter( "woocommerce_gzd_admin_email_order_confirmation_text_option", function( $args ) {
    // Do something
    return $args;    
}, 10, 1 );

woocommerce_gzd_replace_email_titles Filter

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

woocommerce_gzd_replace_email_title_for_textdomain Filter

Filters whether to replace the email title for a given textdomain. By default, only email titles from the Woo core are replaced.

  1. $enable bool Whether to enable searching or not.
  2. $domain string The textdomain.
add_filter( "woocommerce_gzd_replace_email_title_for_textdomain", function( $enable, $domain ) {
    // Do something
    return $enable;    
}, 10, 2 );

woocommerce_gzd_email_title_search_for Filter

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

woocommerce_gzd_email_title Filter

Filter the email title option used to address the customer in emails.

  1. $title string The title.
  2. $order \WC_Order The order object.
add_filter( "woocommerce_gzd_email_title", function( $title, $order ) {
    // Do something
    return $title;    
}, 10, 2 );

woocommerce_gzd_order_confirmation_email_plain_text Filter

Filters the plain order confirmation email text.

  1. $text string The plain text.
add_filter( "woocommerce_gzd_order_confirmation_email_plain_text", function( $text ) {
    // Do something
    return $text;    
}, 10, 1 );

woocommerce_gzd_order_confirmation_email_default_text Filter

Filter the fallback order confirmation email text.

  1. $text string The default text.
add_filter( "woocommerce_gzd_order_confirmation_email_default_text", function( $text ) {
    // Do something
    return $text;    
}, 10, 1 );

woocommerce_gzd_order_confirmation_email_text Filter

Filter the order confirmation introduction text.

  1. $plain string The text.
  2. $order \WC_Order The order object.
add_filter( "woocommerce_gzd_order_confirmation_email_text", function( $plain, $order ) {
    // Do something
    return $plain;    
}, 10, 2 );

woocommerce_gzd_send_order_confirmation_for_manual_order Filter

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

woocommerce_gzd_send_order_confirmation_for_rest_api_orders Filter

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

woocommerce_gzd_disable_gateways_paid_order_email Filter

Filters disabled gateway for the paid for order notification. By adjusting the filter you may deactivate the paid for order notification for certain gateways.

  1. $gateways array Array of gateway ids.
add_filter( "woocommerce_gzd_disable_gateways_paid_order_email", function( $gateways ) {
    // Do something
    return $gateways;    
}, 10, 1 );

woocommerce_gzd_disable_paid_for_order_notification Filter

Filter to adjust whether to disable the paid for order notification based on order data.

  1. $disable bool Whether to disable notification or not.
  2. $order_id int The order id.
add_filter( "woocommerce_gzd_disable_paid_for_order_notification", function( $disable, $order_id ) {
    // Do something
    return $disable;    
}, 10, 2 );

woocommerce_gzd_checkout_order_before_confirmation Action

Triggers after WooCommerce has processed the order via checkout and payment gateway has been processed. This hook may be used to find a uniform way to process orders after the payment method has been triggered.

  1. $order \WC_Order The order object.
add_action( "woocommerce_gzd_checkout_order_before_confirmation", function( $order ) {
    // Do something
        
}, 10, 1 );

woocommerce_germanized_send_instant_order_confirmation Filter

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

woocommerce_gzd_order_confirmation Action

Trigger the order confirmation email. This action triggers the order confirmation email notification.

  1. $order \WC_Order The order object.
add_action( "woocommerce_gzd_order_confirmation", function( $order ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_clear_cart_after_order_confirmation Filter

Decide whether to clear the cart after sending the order confirmation email or not. By default the cart is not cleared to prevent compatibility issues with payment providers like Stripe or Klarna which depend on cart data.

  1. $clear bool Whether to clear cart or not.
  2. $order_id \WC_Order The order.
add_filter( "woocommerce_gzd_clear_cart_after_order_confirmation", function( $clear, $order_id ) {
    // Do something
    return $clear;    
}, 10, 2 );

woocommerce_germanized_before_order_confirmation Action

Before order confirmation emails. Fires before the order confirmation emails are being triggered (admin and user).

  1. $order_id int The order id.
add_action( "woocommerce_germanized_before_order_confirmation", function( $order_id ) {
    // Do something
        
}, 10, 1 );

woocommerce_germanized_order_email_customer_confirmation_sent Filter

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

woocommerce_germanized_order_email_admin_confirmation_sent Filter

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

woocommerce_germanized_order_confirmation_sent Action

After order confirmation emails. Fires after the order confirmation emails are being triggered (admin and user).

  1. $order_id int The order id.
add_action( "woocommerce_germanized_order_confirmation_sent", function( $order_id ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_product_is_revocation_exception Filter

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

woocommerce_gzd_show_differential_taxation_in_emails Filter

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

woocommerce_gzd_differential_taxation_notice_text_email Filter

Filters the differential taxation notice text for emails.

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

woocommerce_gzd_order_confirmation_digital_notice Filter

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

woocommerce_gzd_order_confirmation_service_notice Filter

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