diff --git a/admin/admin-settings.php b/admin/admin-settings.php index 46840a0aff5..c64626d10e9 100644 --- a/admin/admin-settings.php +++ b/admin/admin-settings.php @@ -107,6 +107,14 @@ $woocommerce_settings['general'] = apply_filters('woocommerce_general_settings', 'checkboxgroup' => '' ), + array( + 'desc' => __( '"Ship to same address option" checked by default', 'woothemes' ), + 'id' => 'woocommerce_ship_to_same_address', + 'std' => 'yes', + 'type' => 'checkbox', + 'checkboxgroup' => '' + ), + array( 'desc' => __( 'Show order comments section', 'woothemes' ), 'id' => 'woocommerce_enable_order_comments', diff --git a/classes/checkout.class.php b/classes/checkout.class.php index d17ecf6f9ec..bd1199cc79b 100644 --- a/classes/checkout.class.php +++ b/classes/checkout.class.php @@ -220,7 +220,16 @@ class woocommerce_checkout { // Shipping Details if ($woocommerce->cart->needs_shipping() && !$woocommerce->cart->ship_to_billing_address_only()) : - if (!isset($_POST) || !$_POST) $shiptobilling = apply_filters('woocommerce_shiptobilling_default', 1); else $shiptobilling = $this->get_value('shiptobilling'); + if (!isset($_POST) || !$_POST) : + + $shiptobilling = (get_option('woocommerce_ship_to_same_address')=='yes') ? 1 : 0; + $shiptobilling = apply_filters('woocommerce_shiptobilling_default', $shiptobilling); + + else : + + $shiptobilling = $this->get_value('shiptobilling'); + + endif; echo '

'; diff --git a/readme.txt b/readme.txt index 01f484e47ba..cedd4394cc9 100644 --- a/readme.txt +++ b/readme.txt @@ -113,6 +113,7 @@ Yes you can! Join in on our GitHub repository :) https://github.com/woothemes/wo * Added settings API to be used by Shipping Methods and Payment Gateways * Free shipping/Flat rate uses setting API * Free shipping coupons +* Ship to billing default option = 1.2.4 - 18/11/2011 = * More sale price logic fixes for variations. Now correctly compares variation's prices.