Site icon Anthony Pagay Carbon

How to get paid membership pro membership level ID?

How to get paid membership pro membership level ID? Copy the codes below.

function get_user_member_level_id( $userid ){
	global $wpdb;
	return $wpdb->get_var( "SELECT membership_id FROM wp_pmpro_memberships_users WHERE user_id = $userid" );
}

echo get_user_member_level_id( $userid );
Exit mobile version