Skip Navigation
availability:

WooCommerce Multilingual Version: 3.5

description:

Run your custom functions right after the translated product fields are updated.

type:
action
category:
Updating Content
parameters:
add_action( 'wcml_update_extra_fields', 'the_callback_function', 10, 4 );

There are four parameters being passed to this action:

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

Example

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

}