Prevent an error notice
It only shows when country has states and state was leave in blanc on the form.
This commit is contained in:
parent
d5482d00d0
commit
7d9a1e77a6
|
@ -29,7 +29,8 @@ class WC_Shortcode_Cart {
|
|||
WC()->shipping->reset_shipping();
|
||||
|
||||
$country = wc_clean( $_POST['calc_shipping_country'] );
|
||||
$state = wc_clean( $_POST['calc_shipping_state'] );
|
||||
$state = '';
|
||||
if ( isset($_POST['calc_shipping_state']) ) $state = wc_clean( $_POST['calc_shipping_state'] );
|
||||
$postcode = apply_filters( 'woocommerce_shipping_calculator_enable_postcode', true ) ? wc_clean( $_POST['calc_shipping_postcode'] ) : '';
|
||||
$city = apply_filters( 'woocommerce_shipping_calculator_enable_city', false ) ? wc_clean( $_POST['calc_shipping_city'] ) : '';
|
||||
|
||||
|
|
Loading…
Reference in New Issue