Copy billing to shipping address on order screen. #1269.

This commit is contained in:
Mike Jolley 2012-08-10 12:31:18 +01:00
parent c92742284a
commit 7d47de830b
4 changed files with 6 additions and 4 deletions

View File

@ -184,7 +184,7 @@ function woocommerce_order_data_meta_box($post) {
echo '</div>';
// Display form
echo '<div class="edit_address"><p><button class="button load_customer_billing">'.__('Load customer billing address', 'woocommerce').'</button></p>';
echo '<div class="edit_address"><p><button class="button load_customer_billing">'.__('Load billing address', 'woocommerce').'</button></p>';
foreach ( $billing_data as $key => $field ) :
if (!isset($field['type'])) $field['type'] = 'text';
@ -261,7 +261,7 @@ function woocommerce_order_data_meta_box($post) {
echo '</div>';
// Display form
echo '<div class="edit_address"><p><button class="button load_customer_shipping">'.__('Load customer shipping address', 'woocommerce').'</button></p>';
echo '<div class="edit_address"><p><button class="button load_customer_shipping">' . __('Load shipping address', 'woocommerce') . '</button> <button class="button billing-same-as-shipping">'. __('Copy from billing', 'woocommerce') . '</button></p>';
if ( $shipping_data ) foreach ( $shipping_data as $key => $field ) :
if (!isset($field['type'])) $field['type'] = 'text';

View File

@ -467,7 +467,7 @@ jQuery( function($){
$('input#_shipping_address_2').val( $('input#_billing_address_2').val() );
$('input#_shipping_city').val( $('input#_billing_city').val() );
$('input#_shipping_postcode').val( $('input#_billing_postcode').val() );
$('input#_shipping_country').val( $('input#_billing_country').val() );
$('#_shipping_country').val( $('#_billing_country').val() );
$('input#_shipping_state').val( $('input#_billing_state').val() );
}
return false;

File diff suppressed because one or more lines are too long

View File

@ -153,7 +153,9 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
= 1.6.3 =
* Feature - Option to register using the email address as the username instead of entering a username
* Feature - Ability to change the demo notice text via settings
* Feature - Copy billing to shipping address on order screen
* Tweak - Removed rarely used settings
* Tweak - has_file() handling for variations
= 1.6.2 - 09/08/2012 =
* Feature - Added google analytics event tracking for add to cart buttons (thanks to Max Rice)