Hi,
Luo helped here (to understand the context) : https://toolset.com/forums/topic/auto-populate-cred-multilingual/
I've a Custom Post which has Woocommerce Product as child. But it's a multilingual website.
When I add a Product with a CRED Form which is on parent page, it adds a product with a parent. Then I've a View I use to display Children of the Parent on parent's page. It works great, but not for the multilingual part.
If I use the CRED Form while I browse in English, the parent of the Product is going to have the ID of the English Parent. So when I'm browsing in another language, the View doesn't display the children, because my parent in French for example doesn't any children. It's the original post in English which has all the translations.
Same thing if I add a Product in French, the view of the French parent will display its children, but their translations still have the ID of the parent in French and the English parent won't have children to display.
I think the problem is with my CRED Form made with the precious help of Luo, the translated products have the parent ID of the parent in the language used with the CRED Form, rather than having the ID of the translated parent.
Other way to explain :
1) Current situation. CRED Form used in French:
FR product has FR parent
EN product has FR parent
View on FR parent displays FR product
View on EN parent doesn't display EN product
2) It should be. CRED Form used in French or English:
FR product has FR parent
EN product has EN parent
Both View display the product, doesn't matter the language
Am I right ? How to fix this ?
I had in mind to set a custom field for the parent, to have a unique "serial number" for each parent, doesn't matter the language, number the product will have and then filter... but I didn't find how to have a View with a query like "if child has the same CF as the parent, then display". And I think it would be more correct to update the custom code Luo had the kindness to create in order to solve this.