add_filter( 'wcml_js_lock_fields_input_names', 'the_callback_function' );
- Loại
- filter
- Danh mục
- Cập nhật nội dung
- Phiên bản WooCommerce Multilingual
- 3.8
Miêu tả
Thêm hoặc xóa các tên đầu vào của trường tùy chỉnh bị khóa trên trình biên tập sản phẩm gốc của WooCommerce đối với các sản phẩm đã dịch.
Đối số
Chỉ có một tham số được truyền vào bộ lọc này:- $names
- (array) Mảng chứa các tên đầu vào của trường tùy chỉnh.
Ví dụ sử dụng
Ví dụ
/**
* 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;
}
Các hook liên quan
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