Fix has_shpping_method function
This commit is contained in:
parent
7cf58f920c
commit
bf6cb38445
|
@ -348,13 +348,13 @@ class WC_Order {
|
|||
* @return void
|
||||
*/
|
||||
public function has_shipping_method( $method_id ) {
|
||||
$shipping_methods = $this->get_shipping_methods;
|
||||
$shipping_methods = $this->get_shipping_methods();
|
||||
$has_method = false;
|
||||
|
||||
if ( !$shipping_methods )
|
||||
return false;
|
||||
|
||||
foreach ( $this->get_shipping_methods as $shipping_method ) {
|
||||
foreach ( $shipping_methods as $shipping_method ) {
|
||||
if ( $shipping_method['method_id'] == $method_id )
|
||||
$has_method = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue