Merge pull request #20472 from rnaby/090618-232243

Remove unused variable and unnecessary else if
This commit is contained in:
Claudio Sanches 2018-06-12 13:28:48 -03:00 committed by GitHub
commit ed4c6898f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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' );