Remove unused variable and unnecesary else if
This commit is contained in:
parent
a118d1d921
commit
8d7ae8b413
|
@ -180,8 +180,6 @@ class WC_Gateway_COD extends WC_Payment_Gateway {
|
|||
}
|
||||
}
|
||||
}
|
||||
} elseif ( WC()->cart && WC()->cart->needs_shipping() ) {
|
||||
$needs_shipping = true;
|
||||
}
|
||||
|
||||
$needs_shipping = apply_filters( 'woocommerce_cart_needs_shipping', $needs_shipping );
|
||||
|
@ -193,7 +191,6 @@ class WC_Gateway_COD extends WC_Payment_Gateway {
|
|||
|
||||
// Only apply if all packages are being shipped via chosen method, or order is virtual.
|
||||
if ( ! empty( $this->enable_for_methods ) && $needs_shipping ) {
|
||||
$canonical_rate_ids = array();
|
||||
$order_shipping_items = is_object( $order ) ? $order->get_shipping_methods() : false;
|
||||
$chosen_shipping_methods_session = WC()->session->get( 'chosen_shipping_methods' );
|
||||
|
||||
|
|
Loading…
Reference in New Issue