- availability:
-
WooCommerce Multilingual Version: 3.8
- description:
-
Add or remove the custom fields that do not display in the WCML Translation Editor.
- type:
- filter
- category:
- Miscellaneous
- parameters:
-
add_filter( 'wcml_not_display_single_fields_to_translate', 'the_callback_function', 10, 1 );
There is only one parameter passed to this filter: fields.
- $fields
- (array) The custom field array.
- hook example usage:
-
Example
/** * Add this code to the functions.php file of your theme. */ add_filter( 'wcml_not_display_single_fields_to_translate', 'remove_single_custom_fields_to_translate', 10, 1 ); function remove_single_custom_fields_to_translate( $fields ) { // Remove the "my_custom_info" field from display in WCML Translation Editor $fields[] = 'my_custom_info'; return $fields; }