WPML
add_action( 'wcml_update_extra_fields', 'the_callback_function', 10, 4 );
タイプ
action
カテゴリー
コンテンツの更新
WooCommerce Multilingualバージョン
3.5

説明

翻訳された商品フィールドが更新された直後に、カスタム関数を実行します。

引数

このアクションには4つのパラメーターが渡されます。
$original_product_id
(整数) 元の製品のID。
$translated_product_id
(整数) 翻訳された製品のID。
$translation_data
(配列) 翻訳された製品のデータ。
$target_language
(文字列) 翻訳された製品の言語コード。

使用例

add_action( 'wcml_update_extra_fields', 'my_custom_action', 10, 4 );

function my_custom_action( $original_product_id, $translated_product_id, $translation_data, $target_language ) {

	// my custom action

}

wcml_after_duplicate_product_post_meta, wcml_js_lock_fields_ids, wcml_js_lock_fields_input_names, wcml_js_lock_fields_classes, wcml_before_sync_product, wcml_before_sync_product_data

すべてのコンテンツの更新フック(7件) →