wcml_product_custom_prices

The WooCommerce Multilingual wcml product custom prices hook.

Description

apply_filters( 'wcml_product_custom_prices', (unknown) $custom_prices, (unknown) $product_id, (unknown) $currency ); 

Parameters (3)

0. $custom_prices (unknown)
The custom prices.
1. $product_id (unknown)
The product id.
2. $currency (unknown)
The currency.

Usage

To run the hook, copy the example below.
  1. $custom_prices = apply_filters( 'wcml_product_custom_prices', $custom_prices, $product_id, $currency ); 
  2.  
  3. if ( !empty( $custom_prices ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wcml_product_custom_prices callback 
  2. function filter_wcml_product_custom_prices( $custom_prices, $product_id, $currency ) { 
  3. // make filter magic happen here... 
  4. return $custom_prices
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wcml_product_custom_prices', 'filter_wcml_product_custom_prices', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wcml_product_custom_prices', 'filter_wcml_product_custom_prices', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/inc/currencies/class-wcml-custom-prices.php  
  1. $custom_prices = apply_filters( 'wcml_product_custom_prices', $custom_prices, $product_id, $currency );