• Germanized
  • Hooks

Germanized Core

woocommerce_gzd_customer_activation_checkout_redirect Filter

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

woocommerce_gzd_customer_registration_redirect Filter

Filter URL which serves as redirection if a customer has not yet activated it’s account and wants to access checkout.

  1. $url string The redirection URL.
  2. $param_2 string
add_filter( "woocommerce_gzd_customer_registration_redirect", function( $url, $param_2 ) {
    // Do something
    return $url;    
}, 10, 2 );

woocommerce_gzd_customer_double_opt_in_supported_user_roles Filter

Filters supported DOI user roles. By default only the WooCommerce customer role is supported. “`php function ex_add_doi_roles( $roles ) { $roles[] = ‘my_custom_role’; return $roles; } add_filter( ‘woocommerce_gzd_customer_double_opt_in_supported_user_roles’, ‘ex_add_doi_roles’, 10, 1 ); “`

  1. $roles array Array of roles to be supported.
add_filter( "woocommerce_gzd_customer_double_opt_in_supported_user_roles", function( $roles ) {
    // Do something
    return $roles;    
}, 10, 1 );

woocommerce_gzd_customer_supports_double_opt_in Filter

Filter whether the DOI is supported for a certain user.

  1. $supports_double_opt_in bool Whether the user is supported or not.
  2. $user \WP_User The user instance.
add_filter( "woocommerce_gzd_customer_supports_double_opt_in", function( $supports_double_opt_in, $user ) {
    // Do something
    return $supports_double_opt_in;    
}, 10, 2 );

woocommerce_gzd_double_opt_in_successful_redirect Filter

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

woocommerce_gzd_delete_unactivated_customer Filter

Filters whether a certain user which has not yet been activated should be deleted.

  1. $delete bool Whether to delete the unactivated customer or not.
  2. $user \WP_User The user instance.
add_filter( "woocommerce_gzd_delete_unactivated_customer", function( $delete, $user ) {
    // Do something
    return $delete;    
}, 10, 2 );

woocommerce_gzd_customer_account_activation_query Filter

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

woocommerce_germanized_account_activation_expiration Filter

Filters the expiration time of customer activation keys.

  1. $expiration int The expiration time in seconds.
add_filter( "woocommerce_germanized_account_activation_expiration", function( $expiration ) {
    // Do something
    return $expiration;    
}, 10, 1 );

woocommerce_gzd_customer_opted_in Action

Customer has opted-in. Fires whenever a customer has opted-in (DOI). Triggers before the confirmation e-mail has been sent and the user meta has been deleted.

  1. $user \WP_User The user instance.
add_action( "woocommerce_gzd_customer_opted_in", function( $user ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_user_activation_auto_login Filter

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

woocommerce_gzd_customer_opt_in_finished Action

Customer opt-in finished. Fires after a customer has been marked as opted-in and received the e-mail confirmation. Customer may already be authenticated at this point.

  1. $user \WP_User The user instance.
add_action( "woocommerce_gzd_customer_opt_in_finished", function( $user ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_customer_activation_expired Action

Customer activation code expired. Hook fires whenever a customer tries to activate his account but the activation key has already expired.

  1. $user \WP_User The user instance.
add_action( "woocommerce_gzd_customer_activation_expired", function( $user ) {
    // Do something
        
}, 10, 1 );

woocommerce_gzd_customer_activation_url Filter

Filter the customer activation URL. Added a custom suffix to prevent email clients from stripping points as last chars.

  1. $url string The activation URL.
add_filter( "woocommerce_gzd_customer_activation_url", function( $url ) {
    // Do something
    return $url;    
}, 10, 1 );

woocommerce_gzd_customer_account_cleanup_excluded_user_roles Filter

Filter user roles excluded during account cleanup. By default user roles `administrator`, `editor`, `author` and `shop_manager` are excluded.

  1. $roles array Array of roles to be excluded from account cleanup.
add_filter( "woocommerce_gzd_customer_account_cleanup_excluded_user_roles", function( $roles ) {
    // Do something
    return $roles;    
}, 10, 1 );

woocommerce_gzd_encryption_key_constant Filter

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

woocommerce_gzd_encryption_enable_logging Filter

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

woocommerce_gzd_encryption_log_context Filter

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

woocommerce_gzd_fee_supporting_gateways Filter

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

woocommerce_gzd_order_button_payment_gateway_text Filter

Filter to adjust the forced order submit button text per gateway. By default Woo allows gateways to adjust the submit button text. This behaviour does not comply with the button solution – that is why Germanized adds the option-based static text by default.

  1. $button_text string The static button text from within the options.
  2. $gateway_id string The gateway id.
add_filter( "woocommerce_gzd_order_button_payment_gateway_text", function( $button_text, $gateway_id ) {
    // Do something
    return $button_text;    
}, 10, 2 );

woocommerce_gzd_payment_gateway_description Filter

Filters the gateway description in case gateway fees have been added.

  1. $html string The description.
  2. $gateway \WC_Payment_Gateway The gateway instance.
add_filter( "woocommerce_gzd_payment_gateway_description", function( $html, $gateway ) {
    // Do something
    return $html;    
}, 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_maybe_flush_cache Action

Flush cache action. Trigger the flush cache action to indicate that Germanized wants to flush the cache.

  1. $type string Cache type e.g. db.
  2. $cache_args array Additional arguments.
add_action( "woocommerce_gzd_maybe_flush_cache", function( $type, $cache_args ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_get_product_variation_{$prop} Filter

Filter to adjust a certain product variation 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_Variation The GZD product instance.
  3. $product \WC_Product_Variation The product instance.
  4. $context string The context

woocommerce_gzd_get_product_variation_unit Filter

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

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

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.

  1. $ bool Whether a database update is needed or not.
add_filter( "woocommerce_gzd_needs_db_update", function( $ ) {
    // Do something
    return $;    
}, 10, 1 );

woocommerce_gzd_enable_auto_update_db Filter

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

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

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

Differential taxation mark. Adjust the default differential taxation mark.

  1. $html string The differential mark e.g. `*`.
add_filter( "woocommerce_gzd_differential_taxation_cart_item_mark", function( $html ) {
    // Do something
    return $html;    
}, 10, 1 );

woocommerce_gzd_recalculate_unit_price_cart Filter

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

woocommerce_gzd_unit_price_cart_quantity Filter

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

woocommerce_gzd_cart_product_deposit_packaging_type_html Filter

Filter that allows adjusting the product deposit packaging type HTML content before outputting within cart.

  1. $packaging_title_html string The HTML content.
  2. $cart_item array The cart item data.
  3. $cart_item_key string The cart item key.
add_filter( "woocommerce_gzd_cart_product_deposit_packaging_type_html", function( $packaging_title_html, $cart_item, $cart_item_key ) {
    // Do something
    return $packaging_title_html;    
}, 10, 3 );

woocommerce_gzd_cart_product_units_html Filter

Filter that allows adjusting the product units HTML content before outputting within cart.

  1. $product_units_html string The HTML content.
  2. $cart_item array The cart item data.
  3. $cart_item_key string The cart item key.
add_filter( "woocommerce_gzd_cart_product_units_html", function( $product_units_html, $cart_item, $cart_item_key ) {
    // Do something
    return $product_units_html;    
}, 10, 3 );

woocommerce_gzd_cart_applies_for_photovoltaic_system_vat_exemption Filter

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

woocommerce_gzd_cart_customer_applies_for_photovoltaic_system_vat_exemption Filter

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

woocommerce_gzd_order_contains_photovoltaic_system Filter

Determines whether a photovoltaic system exists in the current order.

  1. $has_photovoltaic_system bool Whether the order includes a photovoltaic system or not.
  2. $items array The order items.
add_filter( "woocommerce_gzd_order_contains_photovoltaic_system", function( $has_photovoltaic_system, $items ) {
    // Do something
    return $has_photovoltaic_system;    
}, 10, 2 );

woocommerce_gzd_cart_contains_photovoltaic_system Filter

Determines whether a photovoltaic system exists in the current cart.

  1. $has_photovoltaic_system bool Whether the cart includes a photovoltaic system or not.
  2. $items array The cart items.
add_filter( "woocommerce_gzd_cart_contains_photovoltaic_system", function( $has_photovoltaic_system, $items ) {
    // Do something
    return $has_photovoltaic_system;    
}, 10, 2 );

woocommerce_gzd_order_needs_age_verification Filter

Filter to determine whether an order needs age verification or not.

  1. $needs_verification bool Whether the order needs age verification or not.
  2. $order_id int The order id
add_filter( "woocommerce_gzd_order_needs_age_verification", function( $needs_verification, $order_id ) {
    // Do something
    return $needs_verification;    
}, 10, 2 );

woocommerce_gzd_cart_needs_age_verification Filter

Determines whether a cart needs age verification or not. This filter might adjust whether cart items need age verification or not.

  1. $needs_age_verification bool Whether items need age verification or not.
  2. $items array The cart items.
add_filter( "woocommerce_gzd_cart_needs_age_verification", function( $needs_age_verification, $items ) {
    // Do something
    return $needs_age_verification;    
}, 10, 2 );

woocommerce_gzd_order_age_verification_min_age Filter

Returns the minimum age for certain order items. This filter might be used to adjust the minimum age for a certain order used for the age verification.

  1. $min_age int The minimum age required to buy.
  2. $items array The order items.
add_filter( "woocommerce_gzd_order_age_verification_min_age", function( $min_age, $items ) {
    // Do something
    return $min_age;    
}, 10, 2 );