Magento Plugin – Manual changes
This information is designed to be followed by ChannelUnity customers who use a customised or older version of Magento, and need to ensure compatibility. If you can’t update your plugin from the Magento 2 marketplace, or you are using Magento 1, follow the relevant guide below.
Magento 2 (1 change)
In the ChannelUnity plugin, edit the file Model/Helper.php
In the function postRequest, make the following change.
Remove this line:
$client->setConfig(['timeout' => 5]);
Replace with this line:
$client->setConfig(['timeout' => 20, 'strictredirects' => true]);
Magento 1 (or similar) (4 changes)
In the ChannelUnity plugin, edit the file code/community/Camiloo/Channelunity/Model/Abstract.php
Function verifypost; line 118; After $session = curl_init();
Add the following (2) new lines:
curl_setopt($session, CURLOPT_POSTREDIR, 7);
curl_setopt($session, CURLOPT_FOLLOWLOCATION, true);
Function getApiKey; line 216; After $session = curl_init();
Add the following (2) new lines:
curl_setopt($session, CURLOPT_POSTREDIR, 7);
curl_setopt($session, CURLOPT_FOLLOWLOCATION, true);
Function postToChannelUnity; line 280; After $session = curl_init();
Add the following (2) new lines:
curl_setopt($session, CURLOPT_POSTREDIR, 7);
curl_setopt($session, CURLOPT_FOLLOWLOCATION, true);
Function postMyURLToChannelUnity; line 312; After $session = curl_init();
Add the following (2) new lines:
curl_setopt($session, CURLOPT_POSTREDIR, 7);
curl_setopt($session, CURLOPT_FOLLOWLOCATION, true);