add_action( 'wcml_before_sync_product_data', 'the_callback_function', 10, 3 );
- 유형
- action
- 카테고리
- 콘텐츠 업데이트
- WooCommerce Multilingual 버전
- 3.7.0
설명
- WCML이 원본 상품에서 번역으로 데이터(이미지, 택소노미, 옵션 등)를 동기화하기 전에 작업을 실행합니다.
- 이 작업은 wcml_before_sync_product 이후에 호출됩니다.
인수
이 작업에 전달되는 매개변수는 3개입니다.- $original_product_id
- (integer) 원본 상품의 ID입니다.
- $translated_product_id
- (integer) 번역된 상품의 ID입니다.
- $target_language
- (문자열) 번역된 상품의 언어 코드입니다.
사용 예시
예제
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
}
관련 훅
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