{"id":6791584,"date":"2015-11-27T02:55:06","date_gmt":"2015-11-27T02:55:06","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/undefined-variable-_session\/"},"modified":"2016-08-30T20:43:19","modified_gmt":"2016-08-30T20:43:19","slug":"undefined-variable-_session","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/undefined-variable-_session\/","title":{"rendered":"Undefined variable: _SESSION"},"content":{"rendered":"<p>When using the WC REST API, Striper gives the following error:<\/p>\n<p><code>Notice: Undefined variable: _SESSION in \/wp-content\/plugins\/striper\/stripe_gateway.php on line 215<\/code><\/p>\n<p>You should add two checks to this line:<\/p>\n<ol>\n<li>Check for the existence of superglobal $_SESSION (not present for API orders)<\/li>\n<li>Check that &#8216;order_awaiting_payment&#8217; isset (may or may not be the case)<\/li>\n<\/ol>\n<p>https:\/\/wordpress.org\/plugins\/striper\/<\/p>\n","protected":false},"template":"","class_list":["post-6791584","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6791584","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\/6791584\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=6791584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}