add_filter( 'wcml_not_display_single_fields_to_translate', 'the_callback_function', 10, 1 );
- ประเภท
- filter
- หมวดหมู่
- เบ็ดเตล็ด
- เวอร์ชันของ WooCommerce Multilingual
- 3.8
คำอธิบาย
เพิ่มหรือลบฟิลด์ที่กำหนดเองที่ไม่แสดงในตัวแก้ไขการแปลของ WCML
อาร์กิวเมนต์
มีพารามิเตอร์เพียงตัวเดียวที่ส่งไปยังฟิลเตอร์นี้: fields- $fields
- (array) อาร์เรย์ของฟิลด์ที่กำหนดเอง
ตัวอย่างการใช้งาน
ตัวอย่าง
/**
* Add this code to the functions.php file of your theme.
*/
add_filter( 'wcml_not_display_single_fields_to_translate', 'remove_single_custom_fields_to_translate', 10, 1 );
function remove_single_custom_fields_to_translate( $fields ) {
// Remove the "my_custom_info" field from display in WCML Translation Editor
$fields[] = 'my_custom_info';
return $fields;
}
ฮุกที่เกี่ยวข้อง
wcml_new_order_admin_email_language, translate_shipping_methods_in_package, wcml_gui_additional_box_html, wcml_current_gateway_language, wcml_variation_term_taxonomy_ids, wcml_is_attributes_page, wcml_is_variable_product, wcml_gui_additional_box_data, wcml_after_load_lock_fields_js, wcml_wc_installed_pages