woocommerce_shipping_calculator_enable_state, true
woocommerce_shipping_calculator_enable_state, true
Appears in: woocommerce.11.0.0
Hook Type: filter
Displaying hooks found in version: woocommerce.11.0.0apply_filters('woocommerce_shipping_calculator_enable_state, true') is found 2 times:
- /includes/class-wc-cart.php line 1855
* @since 8.4.0 * * @param bool $show_state Whether to use the state field. Default true. */ $state_enabled = apply_filters( 'woocommerce_shipping_calculator_enable_state', true ); $state_required = isset( $country_fields['shipping_state'] ) && $country_fields['shipping_state']['required']; // Takes care of late unsetting of checkout fields via hooks (woocommerce_checkout_fields, woocommerce_shipping_fields). $checkout_state_field_exists = isset( $checkout_fields['shipping']['shipping_state'] ); if ( $state_enabled && $state_required && ! $this->get_customer()->get_shipping_state() && $checkout_state_field_exists ) { return false; } - /templates/cart/shipping-calculator.php line 42
</select> </p> <?php endif; ?> <?php if ( apply_filters( 'woocommerce_shipping_calculator_enable_state', true ) ) : ?> <p class="form-row form-row-wide" id="calc_shipping_state_field"> <?php $current_cc = WC()->customer->get_shipping_country(); $current_r = WC()->customer->get_shipping_state(); $states = WC()->countries->get_states( $current_cc );