Code Duplication    Length = 7-7 lines in 2 locations

includes/api/class-wc-rest-customers-controller.php 2 locations

@@ 558-564 (lines=7) @@
555
		}
556
557
		// Customer billing address.
558
		if ( isset( $request['billing'] ) ) {
559
			foreach ( array_keys( $schema['properties']['billing']['properties'] ) as $address ) {
560
				if ( isset( $request['billing'][ $address ] ) ) {
561
					update_user_meta( $customer->ID, 'billing_' . $address, wc_clean( $request['billing'][ $address ] ) );
562
				}
563
			}
564
		}
565
566
		// Customer shipping address.
567
		if ( isset( $request['shipping'] ) ) {
@@ 567-573 (lines=7) @@
564
		}
565
566
		// Customer shipping address.
567
		if ( isset( $request['shipping'] ) ) {
568
			foreach ( array_keys( $schema['properties']['shipping']['properties'] ) as $address ) {
569
				if ( isset( $request['shipping'][ $address ] ) ) {
570
					update_user_meta( $customer->ID, 'shipping_' . $address, wc_clean( $request['shipping'][ $address ] ) );
571
				}
572
			}
573
		}
574
	}
575
576
	/**