Code Duplication    Length = 10-10 lines in 2 locations

includes/admin/meta-boxes/class-wc-meta-box-order-data.php 2 locations

@@ 420-429 (lines=10) @@
417
		$order->set_status( wc_clean( $_POST['order_status'] ), false, true );
418
419
		// Billing address fields
420
		foreach ( self::$billing_fields as $key => $field ) {
421
			if ( ! isset( $field['id'] ) ){
422
				$field['id'] = '_billing_' . $key;
423
			}
424
			if ( is_callable( array( $order, "set{$field['id']}" ) ) ) {
425
				$order->{"set{$field['id']}"}( wc_clean( $_POST[ $field['id'] ] ) );
426
			} else {
427
				$order->add_meta_data( $field['id'], wc_clean( $_POST[ $field['id'] ] ) );
428
			}
429
		}
430
431
		// Shipping address fields
432
		foreach ( self::$shipping_fields as $key => $field ) {
@@ 432-441 (lines=10) @@
429
		}
430
431
		// Shipping address fields
432
		foreach ( self::$shipping_fields as $key => $field ) {
433
			if ( ! isset( $field['id'] ) ){
434
				$field['id'] = '_shipping_' . $key;
435
			}
436
			if ( is_callable( array( $order, "set{$field['id']}" ) ) ) {
437
				$order->{"set{$field['id']}"}( wc_clean( $_POST[ $field['id'] ] ) );
438
			} else {
439
				$order->add_meta_data( $field['id'], wc_clean( $_POST[ $field['id'] ] ) );
440
			}
441
		}
442
443
		if ( $order->get_payment_method() !== wc_clean( $_POST['_payment_method'] ) ) {
444
			$methods              = WC()->payment_gateways->payment_gateways();