diff --git a/classes/class-wc-checkout.php b/classes/class-wc-checkout.php index 31271ce547e..6e8fd44093d 100644 --- a/classes/class-wc-checkout.php +++ b/classes/class-wc-checkout.php @@ -226,7 +226,8 @@ class WC_Checkout { foreach ( $this->checkout_fields['shipping'] as $key => $field ) { if ( $this->posted['shiptobilling'] ) { - update_post_meta( $order_id, '_' . $key, $this->posted[ str_replace( 'shipping_', 'billing_', $key ) ] ); + if ( isset( $this->posted[ str_replace( 'shipping_', 'billing_', $key ) ] ) ) + update_post_meta( $order_id, '_' . $key, $this->posted[ str_replace( 'shipping_', 'billing_', $key ) ] ); } else {