If you're using the older verions of PrestaShop 1.6 with PHP 7.0 you can run into a following error in the API (webservices):

PHP message: [PHP Warning #2] preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead

Here's how to fix it.

Log into the server, where your PrestaShop is installed (eg through FTP) and locate the file:

[prestashop_dir]/classes/webservice/WebserviceOutputJSON.php


In the 164th line there is the cause of this problem:

$content = preg_replace("/\\\\u([a-f0-9]{4})/e", "iconv('UCS-4LE','UTF-8',pack('V', hexdec('U$1')))", $content);

Replace above line with the following:

$content = preg_replace_callback("/\\\\u([a-f0-9]{4})/", function ($matches) {
  return iconv('UCS-4LE','UTF-8', pack('V', hexdec('U' . $matches[1])));
}, $content);