סקירת התקלה
בעת שימוש ב־WooCommerce Quantity Manager עם WPML, כללי הכמות של מוצר, וריאציה או קטגוריית מוצרים אינם חלים על התרגומים שלו. מוצרים מתורגמים מקבלים כל כמות.
פתרון עוקף
- עבור אל WPMLהגדרותהגדרות XML מותאמות אישית, הוסף את ה־XML הבא ושמור:
XML
<wpml-config> <custom-fields> <custom-field action="copy">_wqm_product_quantity</custom-field> <custom-field action="copy">_wqm_product_value</custom-field> <custom-field action="copy">_wqm_product_step</custom-field> <custom-field action="copy">_product_default_quantity</custom-field> <custom-field action="copy">_wqm_variation_product_quantity</custom-field> <custom-field action="copy">_wqm_variation_product_value</custom-field> <custom-field action="copy">_wqm_variation_product_step</custom-field> <custom-field action="copy">_wqm_variation_default_quantity</custom-field> </custom-fields> <custom-term-fields> <custom-term-field action="copy">quantity_manager_category_quantity</custom-term-field> <custom-term-field action="copy">quantity_manager_category_value</custom-term-field> <custom-term-field action="copy">quantity_manager_category_step</custom-term-field> <custom-term-field action="copy">_default_product_quantity</custom-term-field> <custom-term-field action="copy">quantity_manager_override_category_roles</custom-term-field> <custom-term-field action="copy">quantity_manager_category_user_roles[]</custom-term-field> </custom-term-fields> </wpml-config>
- שמור שוב את המוצרים והקטגוריות המקוריים.