• Hi!

    In the file includes/Services/Tools/LocaleMapper.php on line 39 you have this piece of code:

    $languages = json_decode(file_get_contents(plugins_url('smartcat-wpml/languages/smartcat-languages.json')));

    What this does is basically makes a remote request towards the file on the server.

    file_get_contents(https://example.com/wp-content/plugins/smartcat-wpml/languages/smartcat-languages.json)

    Which, in case you’ve blocked access for certain allowed IP addresses, or if you’ve blocked direct access to json files on your server (security), would fail.

    The solution is kinda simple. Just use

    $languages = json_decode(file_get_contents( dirname(__DIR__, 4) . '/smartcat-wpml/languages/smartcat-languages.json'));

    And that should work like a charm.

    You’re welcome.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.