{"id":11232920,"date":"2019-02-21T19:31:21","date_gmt":"2019-02-21T19:31:21","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/youtube-feed-stopped-displaying\/"},"modified":"2019-02-21T19:31:21","modified_gmt":"2019-02-21T19:31:21","slug":"youtube-feed-stopped-displaying","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/youtube-feed-stopped-displaying\/","title":{"rendered":"YouTube feed stopped displaying"},"content":{"rendered":"<p>I saw multiple people discussing this issue without coming to a reasonable conclusion. I started using this plugin today to display YouTube feeds and it looked great until it suddenly disappeared.<\/p>\n<p>Here is the PHP error that is raised:<\/p>\n<pre><code>PHP Error\nInvalid argument supplied for foreach()\nType: PHP Warning\nLine: 431\nFile: \/...\/wp-content\/plugins\/feed-them-social\/feeds\/youtube\/class-youtube-feed-free.php<\/code><\/pre>\n<p>Now why<\/p>\n<p>The code on line 431 was:<\/p>\n<p><code>foreach ( $videos-&gt;items as $post_data ) {<\/code><\/p>\n<p>So I inserted a var_dump($videos) to see what the variable looked like and discovered that this issue relates to daily limits.<\/p>\n<p><code>object(stdClass)#4233 (1) { [&quot;error&quot;]=&gt; object(stdClass)#4231 (3) { [&quot;errors&quot;]=&gt; array(1) { [0]=&gt; object(stdClass)#4234 (4) { [&quot;domain&quot;]=&gt; string(11) &quot;usageLimits&quot; [&quot;reason&quot;]=&gt; string(18) &quot;dailyLimitExceeded&quot; [&quot;message&quot;]=&gt; string(245) &quot;Daily Limit Exceeded. The quota will be reset at midnight Pacific Time (PT). You may monitor your quota usage and adjust limits in the API Console: https:\/\/console.developers.google.com\/apis\/api\/youtube.googleapis.com\/quotas?project=xxx&quot; [&quot;extendedHelp&quot;]=&gt; string(97) &quot;https:\/\/console.developers.google.com\/apis\/api\/youtube.googleapis.com\/quotas?project=xxx&quot; } } [&quot;code&quot;]=&gt; int(403) [&quot;message&quot;]=&gt; string(245) &quot;Daily Limit Exceeded. The quota will be reset at midnight Pacific Time (PT). You may monitor your quota usage and adjust limits in the API Console: https:\/\/console.developers.google.com\/apis\/api\/youtube.googleapis.com\/quotas?project=xxx&quot; } }<\/code><\/p>\n<p>It would be nice if the plugin detected when this limit is reached and displayed it to the user somehow. Also I&#8217;ve got my cache time set to 1 day, so I will leave it and see if the problem fixes itself tomorrow.<\/p>\n","protected":false},"template":"","class_list":["post-11232920","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11232920","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11232920\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=11232920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}