add_action( 'wcml_gui_additional_box_html', 'the_callback_function', 10, 3 );
- ประเภท
- action
- หมวดหมู่
- เบ็ดเตล็ด
- เวอร์ชันของ WooCommerce Multilingual
- 3.8.1
คำอธิบาย
- เพิ่มฟิลด์เพิ่มเติมเพื่อแปลในตัวแก้ไขการแปลของ WCML
- หากต้องการเพิ่มข้อมูลการแปล โปรดดูที่ฮุก wcml_gui_additional_box_data
อาร์กิวเมนต์
มีพารามิเตอร์ 3 ตัวที่ส่งไปยังการดำเนินการนี้- $obj
- (object) ออบเจ็กต์งานแปล
- $product_id
- (integer) ID ของผลิตภัณฑ์ต้นฉบับ
- $data
- (array) อาร์เรย์ข้อมูลงานแปล
ตัวอย่างการใช้งาน
ตัวอย่าง
add_action( 'wcml_gui_additional_box_html', 'my_custom_action', 10, 3 );
function my_custom_action( $obj, $product_id, $data ) {
// my custom action
}
ฮุกที่เกี่ยวข้อง
wcml_new_order_admin_email_language, translate_shipping_methods_in_package, 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, wcml_not_display_single_fields_to_translate