Shipping calc state -> checkout. Closes #959.

This commit is contained in:
Mike Jolley 2012-04-19 12:09:52 +01:00
parent 2e58a1dc92
commit a39fdd1612
2 changed files with 9 additions and 5 deletions

View File

@ -616,13 +616,16 @@ class WC_Checkout {
$default_billing_country = apply_filters('default_checkout_country', ($woocommerce->customer->get_country()) ? $woocommerce->customer->get_country() : $woocommerce->countries->get_base_country());
// ($woocommerce->customer->get_state()) ? $woocommerce->customer->get_state() : $woocommerce->countries->get_base_state()
$default_billing_state = apply_filters('default_checkout_state', '');
$default_shipping_country = apply_filters('default_checkout_country', ($woocommerce->customer->get_shipping_country()) ? $woocommerce->customer->get_shipping_country() : $woocommerce->countries->get_base_country());
$default_shipping_state = apply_filters('default_checkout_state', '');
if ( empty( $_SESSION['calculated_shipping'] ) ) {
$default_billing_state = apply_filters('default_checkout_state', '');
$default_shipping_state = apply_filters('default_checkout_state', '');
} else {
$default_billing_state = apply_filters('default_checkout_state', $woocommerce->customer->get_state());
$default_shipping_state = apply_filters('default_checkout_state', $woocommerce->customer->get_shipping_state());
}
if ($input == "billing_country") return $default_billing_country;
if ($input == "billing_state") return $default_billing_state;

View File

@ -152,6 +152,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Fix - Body classes now correct for WordPress themes with non alphanumeric characters
* Fix - PayPal http_build_query & -> & on some PHP 5.3 servers
* Fix - update_count_callback for tags
* Fix - Pass shipping calc state to checkout
* Localization - Slovak translation by Dušan Beleščák
* Localization - Updated localisations