• Resolved davidcarvajalg

    (@davidcarvajalg)


    Hi, Paul

    Your plugin is really great, I really like it. This is my question…

    How I can give same achievements infinitely? I mean, when an user does an event which has achievement, ok, there is a notification, unlocked achievement and take your points.

    But this user can’t unlocked that achievement ever. If I edit his unlocked achievements into his user profile page and I unmark checkbox to this achievement, I can unlocked again.

    So, I need that achievements can unlock infinite times and give points. I have seen include/core/actions.php and include/users/functions.php and I’m not sure what source code I have to change exactly.

    Please, help and thank you so much!
    David

    https://wordpress.org/plugins/achievements/

    [Moderator Note: No bumping, thank you.]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter davidcarvajalg

    (@davidcarvajalg)

    Hi.

    Finally, I found it myself. It’s in includes/core/functions.php, line 255:

    if ( empty( $progress ) || dpa_get_unlocked_status_id() !== $progress->post_status )

    And lines 304-305:

    if ( ! empty( $progress_obj ) && dpa_get_unlocked_status_id() === $progress_obj->post_status )
    	return;

    If I comment these lines, my users can do the same achievement once and once again and they get points infinitely.

    Thanks!
    D

    If I understand this correctly, commenting out those lines means if I uncheck an awarded achievement, save, then check it again, the user will get double the points?

    Thread Starter davidcarvajalg

    (@davidcarvajalg)

    Thanks for replying but I found a solution and closed that project.

    Sadly, this issue is from 5 months ago, so i can’t remember how to I do it. I forgotted completely.

    Thanks again!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Inifinite unlocked achievements’ is closed to new replies.