PeepSo_Helpers::get_gender( $user_id )


Parameters Parameters

(Required) gender of the follower

$user_id

(Required)


Source Source

File: src/integrations/peepso/helpers/peepso-helpers.php

	public function get_gender( $user_id ) {
		if ( empty( $user_id ) ) {
			return;
		}
		$gender = get_user_meta( $user_id, 'peepso_user_field_gender', true );
		$acc    = get_user_meta( $user_id, 'peepso_user_field_gender_acc', true );

		if ( $gender === 'm' && $acc >= 0 ) {
			return 'Male';
		} elseif ( $gender === 'f' && $acc >= 0 ) {
			return 'Female';
		}
	}