add_action( 'wcml_before_sync_product_data', 'the_callback_function', 10, 3 );
- Type
- action
- Category
- Updating Content
- 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.
Arguments
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.
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
}
Related hooks
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