Remove unused variable and unnecesary else if

This commit is contained in:
Khan M Rashedun-Naby 2018-06-09 23:24:08 +06:00
parent a118d1d921
commit 8d7ae8b413
1 changed files with 0 additions and 3 deletions

View File

@ -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' );