{"action":"opened","issue":{"url":"https://api.github.com/repos/woothemes/woocommerce/issues/8798","labels_url":"https://api.github.com/repos/woothemes/woocommerce/issues/8798/labels{/name}","comments_url":"https://api.github.com/repos/woothemes/woocommerce/issues/8798/comments","events_url":"https://api.github.com/repos/woothemes/woocommerce/issues/8798/events","html_url":"https://github.com/woothemes/woocommerce/issues/8798","id":100574594,"number":8798,"title":"Error - Call to a member function has_status() on a non-object","user":{"login":"cryptoapi","id":8633086,"avatar_url":"https://avatars.githubusercontent.com/u/8633086?v=3","gravatar_id":"","url":"https://api.github.com/users/cryptoapi","html_url":"https://github.com/cryptoapi","followers_url":"https://api.github.com/users/cryptoapi/followers","following_url":"https://api.github.com/users/cryptoapi/following{/other_user}","gists_url":"https://api.github.com/users/cryptoapi/gists{/gist_id}","starred_url":"https://api.github.com/users/cryptoapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cryptoapi/subscriptions","organizations_url":"https://api.github.com/users/cryptoapi/orgs","repos_url":"https://api.github.com/users/cryptoapi/repos","events_url":"https://api.github.com/users/cryptoapi/events{/privacy}","received_events_url":"https://api.github.com/users/cryptoapi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-12T15:48:54Z","updated_at":"2015-08-12T15:48:54Z","closed_at":null,"body":"Some our clients receive error -\r\n\r\nFatal error:  \r\nCall to a member function has_status() on a non-object in <b>/home/vpn/www/wp-content/plugins/woocommerce/includes/wc-order-functions.php on line 311\r\n\r\nI think it happened when external plugin call - $order->payment_complete(); in some cases.\r\n\r\n-----\r\nFile wc-order-functions.php have - \r\n---\r\n\t$order = wc_get_order( $order_id );\r\n\tif ( $order->has_status( 'processing' ) && get_option( 'woocommerce_downloads_grant_access_after_payment' ) == 'no' ) {\r\n\t\treturn;\r\n\t}\r\n------\r\n\r\nPlease change to  -\r\nif ( is_object($order) && $order->has_status( 'processing' ) ....\r\n\r\n\r\n-----------------\r\nTesting configuration - \r\nWooCommerce - https://wordpress.org/plugins/woocommerce/\r\nGoUrl Bitcoin Gateway - wordpress.org/plugins/gourl-bitcoin-payment-gateway-paid-downloads-membership/\r\nGoUrl WooCommerce Addon - https://wordpress.org/plugins/gourl-woocommerce-bitcoin-altcoin-payment-gateway-addon/\r\n\r\n"}}