Closed Jon007 closed 3 years ago
root cause of this is that - with latest plugin versions - on save of new variable product, at the time the variation is created, the language of the parent is not set yet, thus although variation.php insert includes:
pll_set_post_language( $ID, pll_get_post_language( $this->to->get_id() ) );
at this stage the post language returned is false so language setting fails and child posts are not picked up by subsequent queries.
commented by @charalampospapadop on #430 "Seems to work fine the only thing is that when i translate the product first time before i publish it , it does not show the variable products, then i publish it but they still wont show, i had to do 1 extra update after the publish, then they showed up. Thanks again."
Root cause is that get_children() no longer works when in new translation because Polylang adds filter for language taxonomy in wp_term_relationships even though a left join, because the where clause does not allow for no value, items with no taxonomy are filtered out, example WP_Query sql:
on publishing the new translation, the hyyan synchronisation process re-synchronises so everything is resolved on refresh.