You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.
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:
SELECT wp_posts.* FROM wp_posts
LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND wp_posts.post_parent = 644
AND (
wp_term_relationships.term_taxonomy_id IN (173)
)
AND wp_posts.post_type = 'product_variation' AND ((wp_posts.post_status <> 'trash' AND wp_posts.post_status <> 'auto-draft')) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC
on publishing the new translation, the hyyan synchronisation process re-synchronises so everything is resolved on refresh.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: