Skip to content

Commit

Permalink
Merge pull request #28 from razorpay/fix-14
Browse files Browse the repository at this point in the history
Don't use order in params for WC>=2.1
  • Loading branch information
captn3m0 authored Feb 3, 2017
2 parents bfe51b4 + c2f22fa commit 1bf5229
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion razorpay-payments.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,14 @@ function process_payment($order_id)
global $woocommerce;
$order = new WC_Order($order_id);
$woocommerce->session->set(self::SESSION_KEY, $order_id);
if (version_compare(WOOCOMMERCE_VERSION, '2.0.0', '>='))
if (version_compare(WOOCOMMERCE_VERSION, '2.1', '>='))
{
return array(
'result' => 'success',
'redirect' => add_query_arg('key', $order->order_key, $order->get_checkout_payment_url(true))
);
}
else if (version_compare(WOOCOMMERCE_VERSION, '2.0.0', '>='))
{
return array(
'result' => 'success',
Expand Down

0 comments on commit 1bf5229

Please sign in to comment.