-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global attribute terms on new product are not aware of product language #16
Comments
Let me run this back to you, to ensure I got it. You are adding a global attribute (e.g. Color) to a product named "Awesome Shoes". "Awesome Shoes" language is EN. You then select all possible values (e.g. Black, Brown, White, Preto, Castanho, Branco), including the values Preto, Castanho, Branco for the language PT, that is different from the language EN of "Awesome Shoes" you are currently editing. Is this the use case? |
Yes that's exactly it. When viewing a product thus created:
When translating a product thus created, the correct variations are created in the correct language. When re-editing a product thus created:
|
This is a tricky one. When you first create a product, the language of the product is not known to Poylang, and this is why Polylng is not filtering the terms by language as it does when the product has been published/saved. True that Variable products can only be created in the default language (Plugin limitation I need to figure it out how to beat) and the Polylang language dropdown has the default language selected. But the issues I see are (assuming I find a filter to remove the terms that don't belong):
This is a small nightmare to fix. I need to think a bit about it. Maybe replacing the woocommerce ajax that adds the terms by a custom one that takes the dropdown option selected, and some backend logic to filter by that language. Tricky.... |
Don't have nightmares about it, this is not a blocker in any way. |
Credit to @TeemuSuoranta |
very minor bug - when you first add a global attribute to a product, all the attribute's terms in all languages are available for selection.
When you go back in after saving the product, the global attribute correctly displays only the choices for the product language.
The text was updated successfully, but these errors were encountered: