• Germanized
  • Hooks

Germanized Core

woocommerce_gzd_price_range_format Filter

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

woocommerce_gzd_unit_price_range_format Filter

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

woocommerce_gzd_switch_email_locale Action

  1. $param_1 string
  2. $param_2 string
add_action( "woocommerce_gzd_switch_email_locale", function( $param_1, $param_2 ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_restore_email_locale Action

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

woocommerce_gzd_unit_base_hide_amount Filter

Filter that allows changing the amount which is used to determine whether the base for the unit price should be skipped or not. Defaults to 1.

  1. $amount int The amount.
add_filter( "woocommerce_gzd_unit_base_hide_amount", function( $amount ) {
    // Do something
    return $amount;    
}, 10, 1 );

woocommerce_gzd_formatted_deposit_price Filter

Filter to adjust the formatted deposit amount.

  1. $html string The html output
  2. $price string The price html
  3. $args array Additional arguments
add_filter( "woocommerce_gzd_formatted_deposit_price", function( $html, $price, $args ) {
    // Do something
    return $html;    
}, 10, 3 );

wc_gzd_unit_price_base_seperator Filter

Filter to adjust the unit price base separator.

  1. $separator string The separator.
add_filter( "wc_gzd_unit_price_base_seperator", function( $separator ) {
    // Do something
    return $separator;    
}, 10, 1 );

wc_gzd_unit_price_seperator Filter

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

woocommerce_gzd_formatted_unit_price Filter

Filter to adjust the formatted unit price.

  1. $html string The html output
  2. $price string The price html
  3. $unit_base string The unit base html
  4. $unit string The unit html
add_filter( "woocommerce_gzd_formatted_unit_price", function( $html, $price, $unit_base, $unit ) {
    // Do something
    return $html;    
}, 10, 4 );

woocommerce_gzd_additional_costs_include_tax Filter

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

woocommerce_gzd_order_defect_descriptions Filter

Returns a list of defect descriptions on a per product base.

  1. $descriptions string[] The defect descriptions as key => value pairs.
  2. $items array The order items.
add_filter( "woocommerce_gzd_order_defect_descriptions", function( $descriptions, $items ) {
    // Do something
    return $descriptions;    
}, 10, 2 );

woocommerce_gzd_cart_defect_descriptions Filter

Returns a list of defect descriptions on a per product base.

  1. $descriptions string[] The defect descriptions as key => value pairs.
  2. $items array The cart items.
add_filter( "woocommerce_gzd_cart_defect_descriptions", function( $descriptions, $items ) {
    // Do something
    return $descriptions;    
}, 10, 2 );

woocommerce_gzd_update_page_content Filter

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

woocommerce_gzd_item_defect_descriptions_separator Filter

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

woocommerce_gzd_before_get_post_plain_content Action

  1. $param_1 string
  2. $param_2 string
add_action( "woocommerce_gzd_before_get_post_plain_content", function( $param_1, $param_2 ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_after_get_post_plain_content Action

  1. $param_1 string
  2. $param_2 string
add_action( "woocommerce_gzd_after_get_post_plain_content", function( $param_1, $param_2 ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_post_plain_content Filter

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

woocommerce_gzd_base_country_supports_photovoltaic_system_vat_exempt Filter

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

woocommerce_gzd_allow_b2b_photovoltaic_system_vat_exemption Filter

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

woocommerce_gzd_customer_applies_for_photovoltaic_system_vat_exemption Filter

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

woocommerce_gzd_shipping_country_supports_photovoltaic_system_vat_exempt Filter

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

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

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

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

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

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

woocommerce_gzd_templates_requiring_variation_script Filter

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

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

  1. $param_1 string
  2. $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).

  1. $param_1 string
  2. $param_2 string
  3. $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.

  1. $templates array Array containing the template names.
add_filter( "woocommerce_gzd_important_templates", function( $templates ) {
    // Do something
    return $templates;    
}, 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.

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

woocommerce_gzd_deposit_packaging_type_font_size_css Filter

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

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

wc_gzd_revocation_params Filter

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

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

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

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

wc_gzd_cart_voucher_params Filter

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

wc_gzd_checkout_params Filter

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

  1. $core_file string The core template file.
  2. $template string The template name.
  3. $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_gzd_return_shipment_customer_confirmed Action

Action that fires after a return request has been confirmed to the customer.

  1. $shipment_id int The return shipment id.
  2. $shipment \Vendidero\Germanized\Shipments\ReturnShipment The return shipment object.
add_action( "woocommerce_gzd_return_shipment_customer_confirmed", function( $shipment_id, $shipment ) {
    // Do something
        
}, 10, 2 );

woocommerce_gzd_return_shipment_sync_props Filter

Filter to allow adjusting the return shipment props synced from the corresponding order.

  1. $args mixed The properties in key => value pairs.
  2. $shipment \Vendidero\Germanized\Shipments\ReturnShipment The shipment object.
  3. $order_shipment \Vendidero\Germanized\Shipments\Order The shipment order object.
add_filter( "woocommerce_gzd_return_shipment_sync_props", function( $args, $shipment, $order_shipment ) {
    // Do something
    return $args;    
}, 10, 3 );

woocommerce_gzd_return_shipment_synced Action

Action that fires after a return shipment has been synced. Syncing is used to keep the shipment in sync with the corresponding parent shipment.

  1. $shipment \Vendidero\Germanized\Shipments\ReturnShipment The return shipment object.
  2. $order_shipment \Vendidero\Germanized\Shipments\Order The shipment order object.
  3. $args array Array containing properties in key => value pairs to be updated.
add_action( "woocommerce_gzd_return_shipment_synced", function( $shipment, $order_shipment, $args ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_return_shipment_items_synced Action

Action that fires after items of a shipment have been synced.

  1. $shipment \Vendidero\Germanized\Shipments\SimpleShipment The shipment object.
  2. $order_shipment \Vendidero\Germanized\Shipments\Order The shipment order object.
  3. $args array Array containing additional data e.g. items.
add_action( "woocommerce_gzd_return_shipment_items_synced", function( $shipment, $order_shipment, $args ) {
    // Do something
        
}, 10, 3 );

woocommerce_gzd_shipment_item_class Filter

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

woocommerce_gzd_shipment_class Filter

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

woocommerce_gzd_shipment_sync_props Filter

Filter to allow adjusting the shipment props synced from the corresponding order.

  1. $args mixed The properties in key => value pairs.
  2. $shipment \Vendidero\Germanized\Shipments\SimpleShipment The shipment object.
  3. $order_shipment \Vendidero\Germanized\Shipments\Order The shipment order object.
add_filter( "woocommerce_gzd_shipment_sync_props", function( $args, $shipment, $order_shipment ) {
    // Do something
    return $args;    
}, 10, 3 );