Skip to content

Commit 5f7ffb0

Browse files
committed
BUGFIX: incorrect slugs for imported composites
1 parent c40c385 commit 5f7ffb0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Commands/Composites.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ private function create_post($composite)
168168
{
169169
$existingId = WpComposite::id_from_contenthub_id($composite->id);
170170

171+
// Tell Polylang the language of the post to allow multiple posts with the same slug in different languages
172+
$_POST['term_lang_choice'] = $composite->locale;
173+
171174
return wp_insert_post([
172175
'ID' => $existingId,
173176
'post_title' => $composite->title,

0 commit comments

Comments
 (0)