Checking is a user has an achievement
-
I’m trying to check if a user has an achievement before giving them an achievement.
I’m using badgeos_check_achievement_completion_for_user()
And am trying this:
if ( badgeos_check_achievement_completion_for_user( 3249, $user_id ) === false ) {
badgeos_award_achievement_to_user( 3249, $user_id );
}Which isn’t working for me. I have a feeling it’s something simple I’m getting wrong.
If I echo
badgeos_check_achievement_completion_for_user( 3249, $user_id )
, it outputs 1, in case that’s any use in diagnosing.Any help would be much appreciated! Thanks.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Checking is a user has an achievement’ is closed to new replies.