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

説明

  • WCMLがオリジナル商品からその翻訳へデータ(画像、タクソノミー、バリエーションなど)を同期する前に、アクションを実行します。
  • このアクションは、wcml_before_sync_productの後に呼び出されます。

引数

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

使用例

add_action( 'wcml_before_sync_product_data', 'my_custom_action', 10, 3 );

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

	// my custom action

}

wcml_after_duplicate_product_post_meta, wcml_update_extra_fields, wcml_js_lock_fields_ids, wcml_js_lock_fields_input_names, wcml_js_lock_fields_classes, wcml_before_sync_product

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