• Resolved deniell

    (@deniell)


    Hello

    I have a Deprecated error: ” Required parameter $translationEngine follows optional parameter $version in C:\OpenServer5.4\domains\wordpress\wp-content\plugins\weglot\vendor\weglot\weglot-php\src\Client\Client.php on line 72 ” on my local server.
    This happens after I activate the plugin and go to the Weglot tab.

    Screenshot https://www.screencast.com/t/kPS7G5Vg

    Thanks for the replies.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @deniell ,

    I may have a solution for you issue. Can you modify this 2 files :
    /wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Client/Client.php line 72
    replace public function __construct($apiKey, $version = '1', $translationEngine,$options = []) by public function __construct($apiKey, $translationEngine, $version = ‘1’, $options = [])

    and

    wp-content/plugins/weglot/src/services/class-parser-service-weglot.php line 58

    replace `$client = new Client(
    $api_key,
    $version,
    $translation_engine,
    array(
    ‘host’ => Helper_API::get_api_url(),
    )
    );`

    by

    $client = new Client(
    			$api_key,
    			$translation_engine,
    			$version,
    			array(
    				'host' => Helper_API::get_api_url(),
    			)
    		);

    You can also contact our weglot support and ask for me (Edson) to help you make this modification

    Regards

    Thread Starter deniell

    (@deniell)

    This solved my issue. Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error notice’ is closed to new replies.