Merged in release/release-1.09 (pull request #10)

Release/release 1.09

* Install missing plugins 
* rs set to 1

* rebase pantheon for aws

* rebase pantheon for aws

* prod config change

* prod config change

* fix campaing issue

* revert


Approved-by: Jay Sharma
This commit is contained in:
Rachit Bhargava
2023-12-27 20:55:58 +00:00
committed by Jay Sharma
parent 779393381f
commit 22f10a9edd
2154 changed files with 22313 additions and 209875 deletions

View File

@@ -1573,30 +1573,10 @@ class WC_Cart extends WC_Legacy_Cart {
return false;
}
$country_fields = WC()->countries->get_address_fields( $country, 'shipping_' );
/**
* Filter to not require shipping state for shipping calculation, even if it is required at checkout.
* This can be used to allow shipping calculations to be done without a state.
*
* @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'];
if ( $state_enabled && $state_required && ! $this->get_customer()->get_shipping_state() ) {
if ( isset( $country_fields['shipping_state'] ) && $country_fields['shipping_state']['required'] && ! $this->get_customer()->get_shipping_state() ) {
return false;
}
/**
* Filter to not require shipping postcode for shipping calculation, even if it is required at checkout.
* This can be used to allow shipping calculations to be done without a postcode.
*
* @since 8.4.0
*
* @param bool $show_postcode Whether to use the postcode field. Default true.
*/
$postcode_enabled = apply_filters( 'woocommerce_shipping_calculator_enable_postcode', true );
$postcode_required = isset( $country_fields['shipping_postcode'] ) && $country_fields['shipping_postcode']['required'];
if ( $postcode_enabled && $postcode_required && ! $this->get_customer()->get_shipping_postcode() ) {
if ( isset( $country_fields['shipping_postcode'] ) && $country_fields['shipping_postcode']['required'] && ! $this->get_customer()->get_shipping_postcode() ) {
return false;
}
}