Code Duplication    Length = 6-6 lines in 2 locations

includes/class-give-donor.php 1 location

@@ 329-334 (lines=6) @@
326
		);
327
328
		// Backward compatibility.
329
		if ( ! give_has_upgrade_completed( 'v20_upgrades_user_address' ) ) {
330
331
			// Backward compatibility for user id param.
332
			return wp_parse_args( (array) get_user_meta( $this->user_id, '_give_user_address', true ), $default_address );
333
334
		}
335
336
		if ( ! $this->id || empty( $this->address ) || ! array_key_exists( $args['address_type'], $this->address ) ) {
337
			return $default_address;

includes/user-functions.php 1 location

@@ 505-510 (lines=6) @@
502
	}
503
504
	// Backward compatibility.
505
	if ( ! give_has_upgrade_completed( 'v20_upgrades_user_address' ) && $by_user_id ) {
506
		return wp_parse_args(
507
			(array) get_user_meta( $donor_id, '_give_user_address', true ),
508
			$default_address
509
		);
510
	}
511
512
	$donor = new Give_Donor( $donor_id, (bool) $args['by_user_id'] );
513