add_action( 'wcml_before_sync_product', 'the_callback_function', 10, 2 );
- Type
- action
- Category
- Updating Content
- WooCommerce Multilingual Version
- 3.6.3
Description
- Run actions before WCML syncs original products to their translated products.
- This action is called before wcml_before_sync_product_data.
Arguments
There are two parameters being passed to this action:- $original_product_id
- (integer) The ID of original product.
- $translated_product_id
- (integer) The ID of translated product.
Example usage
Example
add_action( 'wcml_before_sync_product', 'my_custom_action', 10, 2 );
function my_custom_action( $original_product_id, $translated_product_id ) {
// 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_data