add_filter( 'wcml_gui_additional_box_data', 'the_callback_function', 10, 4 );
- Loại
- filter
- Danh mục
- Khác
- Phiên bản WooCommerce Multilingual
- 3.8.1
Miêu tả
- Thêm dữ liệu dịch thuật cho các trường trong các phần tùy chỉnh của Trình biên tập dịch thuật WCML.
- Để thêm các trường, hãy xem hook wcml_gui_additional_box_html.
Đối số
Có bốn tham số được truyền vào bộ lọc này:- $data
- (mảng) Mảng dữ liệu công việc dịch thuật.
- $product_id
- (số nguyên) ID của sản phẩm gốc.
- $translation
- (đối tượng) Đối tượng công việc dịch thuật.
- $target_language
- (chuỗi) Mã ngôn ngữ của sản phẩm đã dịch.
Ví dụ sử dụng
Ví dụ
add_filter( 'wcml_gui_additional_box_data', 'my_custom_action', 10, 4 );
function my_custom_action( $data, $product_id, $translation, $target_language ) {
// my custom action
}
Các hook liên quan
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_after_load_lock_fields_js, wcml_wc_installed_pages, wcml_not_display_single_fields_to_translate