Ship to billing default option
This commit is contained in:
parent
c4407d1b6f
commit
21f9723479
|
@ -107,6 +107,14 @@ $woocommerce_settings['general'] = apply_filters('woocommerce_general_settings',
|
||||||
'checkboxgroup' => ''
|
'checkboxgroup' => ''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
array(
|
||||||
|
'desc' => __( '"Ship to same address option" checked by default', 'woothemes' ),
|
||||||
|
'id' => 'woocommerce_ship_to_same_address',
|
||||||
|
'std' => 'yes',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'checkboxgroup' => ''
|
||||||
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Show order comments section', 'woothemes' ),
|
'desc' => __( 'Show order comments section', 'woothemes' ),
|
||||||
'id' => 'woocommerce_enable_order_comments',
|
'id' => 'woocommerce_enable_order_comments',
|
||||||
|
|
|
@ -220,7 +220,16 @@ class woocommerce_checkout {
|
||||||
// Shipping Details
|
// Shipping Details
|
||||||
if ($woocommerce->cart->needs_shipping() && !$woocommerce->cart->ship_to_billing_address_only()) :
|
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 '<p class="form-row" id="shiptobilling"><input class="input-checkbox" '.checked($shiptobilling, 1, false).' type="checkbox" name="shiptobilling" value="1" /> <label for="shiptobilling" class="checkbox">'.__('Ship to same address?', 'woothemes').'</label></p>';
|
echo '<p class="form-row" id="shiptobilling"><input class="input-checkbox" '.checked($shiptobilling, 1, false).' type="checkbox" name="shiptobilling" value="1" /> <label for="shiptobilling" class="checkbox">'.__('Ship to same address?', 'woothemes').'</label></p>';
|
||||||
|
|
||||||
|
|
|
@ -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
|
* Added settings API to be used by Shipping Methods and Payment Gateways
|
||||||
* Free shipping/Flat rate uses setting API
|
* Free shipping/Flat rate uses setting API
|
||||||
* Free shipping coupons
|
* Free shipping coupons
|
||||||
|
* Ship to billing default option
|
||||||
|
|
||||||
= 1.2.4 - 18/11/2011 =
|
= 1.2.4 - 18/11/2011 =
|
||||||
* More sale price logic fixes for variations. Now correctly compares variation's prices.
|
* More sale price logic fixes for variations. Now correctly compares variation's prices.
|
||||||
|
|
Loading…
Reference in New Issue