Resolved in: 4.3.4


This issue will occur when those 3 conditions are true:

  • The site uses “Different languages in directories” as a language format
  • The “Use directory for default language” option is checked
  • The site is NOT installed in a subdirectory, e.g. “”Then the REST API is not available under URL “” but is still visible under “”.


In order to temporary fix it, you will need to modify WPML_URL_Converter_Subdir_Strategy::is_use_directory_for_default_lang_enabled in this way:

public function is_use_directory_for_default_lang_enabled() {
   return $this->use_directory_for_default_lang;

Do not apply this temporary fix if your site is installed in a subdirectory: e.g. “”. In such a case, the current code works correctly.

We are working on a permanent fix and it’ll be included in one of our next versions.

One Response to ““Use directory for default language” does not work with REST API”