- availability:
-
WooCommerce Multilingual Version: 3.8
- description:
-
Add or remove custom field input names that are locked on the WooCommerce native product editor of translated products.
- type:
- filter
- category:
- Updating Content
- parameters:
-
add_filter( 'wcml_js_lock_fields_input_names', 'the_callback_function' );
There is only one parameter passed to this filter:
- $names
- (array) The array including custom field input names.
- hook example usage:
-
Example
/** * Add this code to the functions.php file of your theme. */ add_filter( 'wcml_js_lock_fields_input_names', 'add_js_lock_fields_input_names' ); function add_js_lock_fields_input_names( $names ){ // Add 2 locked field input names $names[] = '_base_regular_price'; $names[] = 'bto_style'; return $names; }