public function show_shipping()
{
if (!wc_shipping_enabled() || !is_array($this->cart_contents)) {
return false;
}
if ('yes' === get_option('woocommerce_shipping_cost_requires_address')) {
if (!WC()->customer->has_calculated_shipping()) {
if (!WC()->customer->get_shipping_country() || !WC()->customer->get_shipping_state() && !WC()->customer->get_shipping_postcode()) {
return false;
}
}
}
return apply_filters('woocommerce_cart_ready_to_calc_shipping', true);
}