Skip Navigation
availability:

WooCommerce Multilingual Version: 3.8

description:

Add or remove custom field IDs that are locked on the WooCommerce native product editor of translated products.

type:
filter
category:
Updating Content
parameters:
add_filter( 'wcml_js_lock_fields_ids', 'the_callback_function' );

There is only one parameter passed to this filter:

$ids
(array) The array including custom field IDs.
hook example usage:

Example

/**
 * Add this code to the functions.php file of your theme.
 */
add_filter( 'wcml_js_lock_fields_ids', 'add_js_lock_fields_ids' );

function add_js_lock_fields_ids( $ids ){

	// Add 2 locked field IDs
	$ids[] = '_per_product_pricing_bto';
	$ids[] = '_per_product_shipping_bto';

	return $ids;
}