i get this error from the error-log
[30-Oct-2017 11:42:39 UTC] order_key was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_checkout’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WC_GTPayPayment->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
Hello, am having same error during checkout. Please is there a possible fix for this?
Replace
return array(
'result' => 'success',
'redirect' => add_query_arg(
'order-pay', $order->id, add_query_arg(
'key', $order->order_key, get_permalink(get_option('woocommerce_pay_page_id'))
)
)
);
with:
return array(
'result' => 'success',
'redirect' => $order->get_checkout_payment_url( true )
);
on gtpay-payment.php line 288.
i have this same issue it is redireccting me back to my home page
I have the same issue and resolved with given instruction by @motajom.
@motajom
Thanks Man 🙂