問題の概要
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>
- 元の商品とカテゴリーを再度保存します。