wcml_custom_prices_fields_labels

The WooCommerce Multilingual wcml custom prices fields labels hook.

Description

apply_filters( 'wcml_custom_prices_fields_labels', (callback) $array, (unknown) $product_id ); 

Parameters (2)

0. $array — Optional. (callback) => array( '_regular_price' => __( 'Regular Price', 'woocommerce-multilingual' ), '_sale_price' => __( 'Sale Price', 'woocommerce-multilingual' ) )
The array.
1. $product_id (unknown)
The product id.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'wcml_custom_prices_fields_labels', $array, $product_id ); 
  2.  
  3. if ( !empty( $array ) ) { 
  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_fields_labels callback 
  2. function filter_wcml_custom_prices_fields_labels( $array, $product_id ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wcml_custom_prices_fields_labels', 'filter_wcml_custom_prices_fields_labels', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wcml_custom_prices_fields_labels', 'filter_wcml_custom_prices_fields_labels', 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. $this->custom_prices_fields_labels = apply_filters( 'wcml_custom_prices_fields_labels', array( '_regular_price' => __( 'Regular Price', 'woocommerce-multilingual' ), '_sale_price' => __( 'Sale Price', 'woocommerce-multilingual' ) ), $product_id );