Skip Navigation
availability:

WooCommerce Multilingual Version: 3.7.0

description:
  • Run actions before WCML syncs data (images, taxonomies, variations, etc) from original products to their translations.
  • This action is called after wcml_before_sync_product.
type:
action
category:
Updating Content
parameters:
add_action( 'wcml_before_sync_product_data', 'the_callback_function', 10, 3 );

There are three parameters being passed to this action:

$original_product_id
(integer) The ID of original product.
$translated_product_id
(integer) The ID of translated product.
$target_language
(string) The language code of translated product.
hook example usage:

Example

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

}