removed not defined $wp variable in favor to get_query_var() function

This commit is contained in:
claudiosmweb 2014-04-24 15:03:33 -03:00 committed by Mike Jolley
parent 4f11effbcd
commit 67e29eade6
1 changed files with 3 additions and 2 deletions

View File

@ -117,9 +117,9 @@ class WC_Gateway_COD extends WC_Payment_Gateway {
$check_method = false;
if ( is_page( wc_get_page_id( 'checkout' ) ) && ! empty( $wp->query_vars['order-pay'] ) ) {
if ( is_page( wc_get_page_id( 'checkout' ) ) && 0 < get_query_var( 'order-pay' ) ) {
$order_id = absint( $wp->query_vars['order-pay'] );
$order_id = absint( get_query_var( 'order-pay' ) );
$order = new WC_Order( $order_id );
if ( $order->shipping_method )
@ -150,6 +150,7 @@ class WC_Gateway_COD extends WC_Payment_Gateway {
return parent::is_available();
}
/**
* Process the payment and return the result
*