Fix deprecation notice from accessing order props directly

This commit is contained in:
Beka Rice 2017-07-13 09:56:46 -04:00
parent 6b101d790e
commit 1f95709e42
1 changed files with 2 additions and 2 deletions

View File

@ -165,8 +165,8 @@ class WC_Gateway_COD extends WC_Payment_Gateway {
$check_method = false; $check_method = false;
if ( is_object( $order ) ) { if ( is_object( $order ) ) {
if ( $order->shipping_method ) { if ( $order->get_shipping_method() ) {
$check_method = $order->shipping_method; $check_method = $order->get_shipping_method();
} }
} elseif ( empty( $chosen_shipping_methods ) || sizeof( $chosen_shipping_methods ) > 1 ) { } elseif ( empty( $chosen_shipping_methods ) || sizeof( $chosen_shipping_methods ) > 1 ) {
$check_method = false; $check_method = false;