add_filter( 'wcml_js_lock_fields_input_names', 'the_callback_function' );
- タイプ
- filter
- カテゴリー
- コンテンツの更新
- WooCommerce Multilingualバージョン
- 3.8
説明
翻訳された商品のWooCommerceネイティブ商品エディタでロックされているカスタムフィールドの入力名を追加または削除します。
引数
このフィルターに渡されるパラメーターは1つだけです。- $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