wcml_custom_prices_strings

The WooCommerce Multilingual wcml custom prices strings hook.

Description

apply_filters( 'wcml_custom_prices_strings', (callback) $var, (unknown) $this_product_id ); 

Parameters (2)

0. $var — Optional. (callback) => array( 'not_set' => sprintf( __( 'Multi-currency is enabled but no secondary currencies have been set. %sAdd secondary currencies%s.', 'woocommerce-multilingual' ), '', '' ), 'calc_auto' => __( 'Calculate prices in other currencies automatically', 'woocommerce-multilingual' ), 'see_prices' => __( 'Click to see the prices in the other currencies as they are currently shown on the front end.', 'woocommerce-multilingual' ), 'show' => __( 'Show', 'woocommerce-multilingual' ), 'hide' => __( 'Hide', 'woocommerce-multilingual' ), 'set_manually' => __( 'Set prices in other currencies manually', 'woocommerce-multilingual' ), 'enter_prices' => __( 'Enter prices in other currencies', 'woocommerce-multilingual' ), 'hide_prices' => __( 'Hide prices in other currencies', 'woocommerce-multilingual' ), 'det_auto' => __( 'Determined automatically based on exchange rate', 'woocommerce-multilingual' ), '_regular_price' => __( 'Regular Price', 'woocommerce-multilingual' ), '_sale_price' => __( 'Sale Price', 'woocommerce-multilingual' ), 'schedule' => __( 'Schedule', 'woocommerce-multilingual' ), 'same_as_def' => __( 'Same as default currency', 'woocommerce-multilingual' ), 'set_dates' => __( 'Set dates', 'woocommerce-multilingual' ), 'collapse' => __( 'Collapse', 'woocommerce-multilingual' ), 'from' => __( 'From…', 'woocommerce-multilingual' ), 'to' => __( 'To…', 'woocommerce-multilingual' ), 'enter_price' => __( 'Please enter in a value less than the regular price', 'woocommerce-multilingual' ) )
The array.
1. $this_product_id (unknown)
The this product id.

Usage

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

Defined (1)

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

/inc/template-classes/multi-currency/class-wcml-custom-prices-ui.php  
  1. 'strings' => apply_filters( 'wcml_custom_prices_strings', array(