Update user meta for billing fields

This commit is contained in:
Mike Jolley 2013-08-08 12:37:42 +01:00
parent 5a1cc2362e
commit e29c67b6bc
1 changed files with 5 additions and 1 deletions

View File

@ -187,9 +187,13 @@ class WC_Checkout {
// Store user data // Store user data
if ( $this->checkout_fields['billing'] ) if ( $this->checkout_fields['billing'] )
foreach ( $this->checkout_fields['billing'] as $key => $field ) foreach ( $this->checkout_fields['billing'] as $key => $field ) {
update_post_meta( $order_id, '_' . $key, $this->posted[ $key ] ); update_post_meta( $order_id, '_' . $key, $this->posted[ $key ] );
if ( $this->customer_id )
update_user_meta( $this->customer_id, $key, $this->posted[ $key ] );
}
if ( $this->checkout_fields['shipping'] && $woocommerce->cart->needs_shipping() ) { if ( $this->checkout_fields['shipping'] && $woocommerce->cart->needs_shipping() ) {
foreach ( $this->checkout_fields['shipping'] as $key => $field ) { foreach ( $this->checkout_fields['shipping'] as $key => $field ) {
$postvalue = false; $postvalue = false;