WC_Cart::show_shipping()
Sees if the customer has entered enough data to calc the shipping yet.
Description Description
Return Return
(bool)
Source Source
File: includes/class-wc-cart.php
public function show_shipping() { if ( ! wc_shipping_enabled() || ! $this->get_cart_contents() ) { return false; } if ( 'yes' === get_option( 'woocommerce_shipping_cost_requires_address' ) ) { if ( ! $this->get_customer()->has_calculated_shipping() ) { if ( ! $this->get_customer()->get_shipping_country() || ( ! $this->get_customer()->get_shipping_state() && ! $this->get_customer()->get_shipping_postcode() ) ) { return false; } } } return apply_filters( 'woocommerce_cart_ready_to_calc_shipping', true ); }