Merge pull request #6947 from juangadiel/master

Update class-wc-checkout.php fixes issue #6940
This commit is contained in:
Mike Jolley 2014-12-21 00:36:04 +00:00
commit a79bedc945
1 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,7 @@
* @class WC_Cart
* @version 2.1.0
* @package WooCommerce/Classes
* @category Class
* @category Class
* @author WooThemes
*/
class WC_Checkout {
@ -300,8 +300,10 @@ class WC_Checkout {
foreach ( $billing_address as $key => $value ) {
update_user_meta( $this->customer_id, 'billing_' . $key, $value );
}
foreach ( $shipping_address as $key => $value ) {
update_user_meta( $this->customer_id, 'shipping_' . $key, $value );
if ( WC()->cart->needs_shipping() ) {
foreach ( $shipping_address as $key => $value ) {
update_user_meta( $this->customer_id, 'shipping_' . $key, $value );
}
}
}
do_action( 'woocommerce_checkout_update_user_meta', $this->customer_id, $this->posted );