tubiz/voguepay-woocommerce-payment-gateway — pull request #1 by deus-ex (2014-02-18 20:16:11+00:00)
Title: Failed transaction throwing an error on line 305

I declare $order = new WC_Order($order_id) before if($transaction['status'] == 'Approved') to solve the problem