Skip to content

Commit

Permalink
fixed RelatedSearchQueries for worldwide
Browse files Browse the repository at this point in the history
x-fran committed Aug 24, 2020
1 parent cb6e8e3 commit c15eaf5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Google/GTrends.php
Original file line number Diff line number Diff line change
@@ -145,6 +145,7 @@ public function getRelatedSearchQueries($keyWordList=null, $category=0, $time='t
if (stripos($widget['id'], 'RELATED_QUERIES') !== false) {

$kWord = $widget['request']['restriction']['complexKeywordsRestriction']['keyword'][0]['value'] ?? null;
$widget['request']['restriction']['geo'] = ($widget['request']['restriction']['geo']) ?: new \stdClass();
$relatedPayload['hl'] = $this->options['hl'];
$relatedPayload['tz'] = $this->options['tz'];
$relatedPayload['req'] = Json\Json::encode($widget['request']);

0 comments on commit c15eaf5

Please sign in to comment.