ภาพรวมของปัญหา
เมื่อใช้งาน YITH WooCommerce Badge Management Premium ร่วมกับ WPML คุณอาจพบปัญหาต่อไปนี้: ป้ายกำกับที่แปลแล้วสูญเสียการตั้งค่า เช่น ประเภท สี และตำแหน่ง WPML ไม่ได้คัดลอกการตั้งค่าเหล่านี้ ดังนั้นป้ายกำกับที่แปลแล้วจึงถูกปิดการใช้งาน สินค้าที่แปลแล้วซึ่งใช้ป้ายกำกับนี้จะไม่แสดงป้ายกำกับใด ๆ
วิธีแก้ปัญหาชั่วคราว
กำหนดให้ WPML คัดลอกการตั้งค่าป้ายไปยังป้ายที่แปลแล้ว:
- ไปที่ WPMLการตั้งค่า และเปิดแท็บ การกำหนดค่า XML ที่กำหนดเอง
- วางโค้ดด้านล่างแล้วคลิก บันทึก
- อัปเดตป้ายและผลิตภัณฑ์ต้นฉบับ เพื่อให้ WPML อัปเดตการแปล
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>