From 1f95709e42ce6c01c577f8957e3a13d66f5f630d Mon Sep 17 00:00:00 2001 From: Beka Rice Date: Thu, 13 Jul 2017 09:56:46 -0400 Subject: [PATCH] Fix deprecation notice from accessing order props directly --- includes/gateways/cod/class-wc-gateway-cod.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/gateways/cod/class-wc-gateway-cod.php b/includes/gateways/cod/class-wc-gateway-cod.php index 91faa489a9e..d1746222916 100644 --- a/includes/gateways/cod/class-wc-gateway-cod.php +++ b/includes/gateways/cod/class-wc-gateway-cod.php @@ -165,8 +165,8 @@ class WC_Gateway_COD extends WC_Payment_Gateway { $check_method = false; if ( is_object( $order ) ) { - if ( $order->shipping_method ) { - $check_method = $order->shipping_method; + if ( $order->get_shipping_method() ) { + $check_method = $order->get_shipping_method(); } } elseif ( empty( $chosen_shipping_methods ) || sizeof( $chosen_shipping_methods ) > 1 ) { $check_method = false;