Fix deprecation notice from accessing order props directly
This commit is contained in:
parent
6b101d790e
commit
1f95709e42
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue