From 861789796bbe4ccc84eb338a8952fef33b74d56d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Rodrigo=20Cal=C3=B3gero?= Date: Tue, 11 Aug 2020 20:25:58 +1000 Subject: [PATCH] Update Feed.php Shopify doesn't accept a CURL without `CURLOPT_USERAGENT` option, it returns `403 Forbidden` instead. --- src/Feed.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Feed.php b/src/Feed.php index 974c7d7..2472300 100644 --- a/src/Feed.php +++ b/src/Feed.php @@ -214,6 +214,7 @@ private static function httpRequest($url, $user, $pass) curl_setopt($curl, CURLOPT_TIMEOUT, 20); curl_setopt($curl, CURLOPT_ENCODING, ''); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // no echo, just return result + curl_setopt($curl, CURLOPT_USERAGENT, ''); if (!ini_get('open_basedir')) { curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); // sometime is useful :) }