add_filter( 'wcml_js_lock_fields_ids', 'the_callback_function' );
- 유형
- filter
- 카테고리
- 콘텐츠 업데이트
- WooCommerce Multilingual 버전
- 3.8
설명
번역된 상품의 WooCommerce 기본 상품 에디터에서 잠겨 있는 사용자 정의 필드 ID를 추가하거나 제거하세요.
인수
이 필터에는 하나의 매개변수만 전달됩니다:- $ids
- (배열) 사용자 정의 필드 ID가 포함된 배열입니다.
사용 예시
예제
/**
* 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;
}
관련 훅
wcml_after_duplicate_product_post_meta, wcml_update_extra_fields, wcml_js_lock_fields_input_names, wcml_js_lock_fields_classes, wcml_before_sync_product, wcml_before_sync_product_data