WPML
add_filter( 'wcml_js_lock_fields_input_names', 'the_callback_function' );
유형
filter
카테고리
콘텐츠 업데이트
WooCommerce Multilingual 버전
3.8

설명

번역된 상품의 WooCommerce 기본 상품 에디터에서 잠겨 있는 사용자 정의 필드 입력 이름을 추가하거나 제거하세요.

인수

이 필터에는 하나의 매개변수만 전달됩니다:
$names
(array) 사용자 정의 필드 입력 이름을 포함하는 배열입니다.

사용 예시

예제
/**
 * 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;
}

wcml_after_duplicate_product_post_meta, wcml_update_extra_fields, wcml_js_lock_fields_ids, wcml_js_lock_fields_classes, wcml_before_sync_product, wcml_before_sync_product_data

모든 콘텐츠 업데이트 훅 7개 →