wcml_meta_value_before_add

The WooCommerce Multilingual wcml meta value before add hook.

Description

apply_filters( 'wcml_meta_value_before_add', (unknown) $meta_value, (unknown) $custom_filed_key ); 

Parameters (2)

0. $meta_value (unknown)
The meta value.
1. $custom_filed_key (unknown)
The custom filed key.

Usage

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

Defined (1)

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

/inc/translation-editor/class-wcml-synchronize-product-data.php  
  1. $meta_value = apply_filters( 'wcml_meta_value_before_add', $meta_value, $custom_filed_key );