WPML
add_filter( 'wcml_gui_additional_box_data', 'the_callback_function', 10, 4 );
タイプ
filter
カテゴリー
その他
WooCommerce Multilingualバージョン
3.8.1

説明

  • WCML翻訳エディタのカスタムセクションにあるフィールドの翻訳データを追加します。
  • フィールドを追加するには、wcml_gui_additional_box_htmlフックを参照してください。

引数

このフィルターには4つのパラメーターが渡されます。
$data
(配列) 翻訳ジョブのデータ配列。
$product_id
(整数) 元の商品のID。
$translation
(オブジェクト) 翻訳ジョブオブジェクト。
$target_language
(文字列) 翻訳された商品の言語コード。

使用例

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
 
}

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

すべてのその他フック(12件) →