add_action( 'wcml_update_extra_fields', 'the_callback_function', 10, 4 );
- Type
- action
- Category
- Updating Content
- WooCommerce Multilingual Version
- 3.5
Description
Run your custom functions right after the translated product fields are updated.
Arguments
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.
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
}
Related hooks
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