Skip to content

Commit 50d8dd8

Browse files
committed
fix(wordpress): fix error 500 when using defaultUrl without WPML
1 parent 0ac9e09 commit 50d8dd8

File tree

1 file changed

+1
-1
lines changed
  • packages/smooth-backend-wordpress/src/wordpress/plugin

1 file changed

+1
-1
lines changed

packages/smooth-backend-wordpress/src/wordpress/plugin/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function get_content($data)
149149
$slug = $data['slug'];
150150
$lang = $data['lang'];
151151
$post = get_page_by_path($slug, OBJECT, $postType);
152-
if ($lang) {
152+
if ($lang && function_exists(icl_object_id)) {
153153
$post = get_page(icl_object_id($post->ID, $postType, true, $lang));
154154
}
155155
if (!$post) {

0 commit comments

Comments
 (0)