Wordpress-Plugin Twitch Stream Status with outdated API

All your code does is json_decode the response from Twitch it doesn’t process the return data.

The format of the return is documented here

If you have `{“data”:}’ then no stream is active, if you have ‘{"data:[{ASTREAM}]}’ (where ASTREAM is a payload as documented) then you are live. Your code doesn’t process this

The contents of the include.php file don’t make any sense. There are not if switches testing for a stream present data returned from the API.

if it’s using template switches, then the template tag ONLINE (which seems unlikely) if is never set anyway.

This is a Wordpress/plugin problem not a Twitch API one.