Tổng quan về sự cố
Khi sử dụng YITH WooCommerce Badge Management Premium với WPML, bạn có thể gặp phải sự cố sau: huy hiệu đã dịch bị mất các cài đặt, chẳng hạn như loại, màu sắc và vị trí. WPML không sao chép chúng, do đó huy hiệu đã dịch bị tắt. Sản phẩm đã dịch sử dụng huy hiệu này sẽ không hiển thị huy hiệu.
Giải pháp tạm thời
Để WPML sao chép các cài đặt huy hiệu sang các huy hiệu đã dịch:
- Truy cập WPMLCài đặt và mở tab Cấu hình XML tùy chỉnh.
- Dán đoạn mã bên dưới và nhấp vào Lưu.
- Cập nhật các huy hiệu và sản phẩm gốc, để WPML cập nhật các bản dịch của chúng.
XML
<wpml-config> <custom-fields> <custom-field action="copy">_yith_wcbm_badge_from_date</custom-field> <custom-field action="copy" type="post-ids">_yith_wcbm_badge_ids</custom-field> <custom-field action="copy">_yith_wcbm_badge_schedule</custom-field> <custom-field action="copy">_yith_wcbm_badge_to_date</custom-field> <custom-field action="translate">_text</custom-field> <custom-field action="copy">_enabled</custom-field> <custom-field action="copy">_type</custom-field> <custom-field action="copy">_image</custom-field> <custom-field action="copy">_background_color</custom-field> <custom-field action="copy">_size</custom-field> <custom-field action="copy">_padding</custom-field> <custom-field action="copy">_border_radius</custom-field> <custom-field action="copy">_position</custom-field> <custom-field action="copy">_alignment</custom-field> </custom-fields> </wpml-config>