diff --git a/classes/class-wc-checkout.php b/classes/class-wc-checkout.php index e5d34ce0b67..a035dae999f 100644 --- a/classes/class-wc-checkout.php +++ b/classes/class-wc-checkout.php @@ -564,16 +564,19 @@ class WC_Checkout { else : + $default_country = apply_filters('default_checkout_country', $woocommerce->countries->get_base_country()); + $default_state = apply_filters('default_checkout_state', $woocommerce->countries->get_base_state()); + // If we are here then the user is not logged in - try to use the session data, otherwise default to base - if ($input == "billing_country") return ($woocommerce->customer->get_country()) ? $woocommerce->customer->get_country() : $woocommerce->countries->get_base_country(); + if ($input == "billing_country") return ($woocommerce->customer->get_country()) ? $woocommerce->customer->get_country() : $default_country; - if ($input == "billing_state") return ($woocommerce->customer->get_state()) ? $woocommerce->customer->get_state() : $woocommerce->countries->get_base_state(); + if ($input == "billing_state") return ($woocommerce->customer->get_state()) ? $woocommerce->customer->get_state() : $default_state; if ($input == "billing_postcode") return ($woocommerce->customer->get_postcode()) ? $woocommerce->customer->get_postcode() : ''; - if ($input == "shipping_country") return ($woocommerce->customer->get_shipping_country()) ? $woocommerce->customer->get_shipping_country() : $woocommerce->countries->get_base_country(); + if ($input == "shipping_country") return ($woocommerce->customer->get_shipping_country()) ? $woocommerce->customer->get_shipping_country() : $default_country; - if ($input == "shipping_state") return ($woocommerce->customer->get_shipping_state()) ? $woocommerce->customer->get_shipping_state() : $woocommerce->countries->get_base_state(); + if ($input == "shipping_state") return ($woocommerce->customer->get_shipping_state()) ? $woocommerce->customer->get_shipping_state() : $default_state; if ($input == "shipping_postcode") return ($woocommerce->customer->get_shipping_postcode()) ? $woocommerce->customer->get_shipping_postcode() : ''; diff --git a/readme.txt b/readme.txt index bdc1f42241c..555de71b682 100644 --- a/readme.txt +++ b/readme.txt @@ -152,6 +152,8 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * woocommerce_file_download_path hook * Order screen has icons showing customer notes + order notes * Fixed category hierarchy (typo) +* Delete term cleanup +* Filters to override default country and state on checkout form = 1.4.4 - 18/02/2012 = * Fix for remove coupon links after ajax update of shipping