Overview of the Issue
When using YITH WooCommerce Badge Management Premium with WPML, you might experience the following issue: a translated badge loses its settings, such as the type, colors and position. WPML does not copy them, so the translated badge is disabled. A translated product that uses this badge shows no badge.
Workaround
Make WPML copy the badge settings to the translated badges:
- Go to WPMLSettings and open the Custom XML Configuration tab.
- Paste the code below and click Save.
- Update the original badges and products, so WPML updates their translations.
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>