• Resolved DrHariri

    (@ala7lam)


    Hi,

    I am trying to make use of the already built in user meta field: _badgeos_points such as connect it to an external service for auto responders based on number of points the user has. The problem is, I just tried it, and for some reason, it shows the points next to today’s date: 8100-12-31.

    Any reason why this is happening or whether it can be modified, or should I try to find where it is written and clone it to the way I want? If yes, can you please point to where it is defined?

    Thanks a lot!

    https://www.ads-software.com/plugins/badgeos/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not sure where that is coming from. I checked the codebase, and the only time the meta key gets updated is with points.

    $total_points = absint( $current_points + $new_points );
    update_user_meta( $user_id, '_badgeos_points', $total_points );

    You can see the source code for it at https://badgeos.org/api/source-function-badgeos_update_users_points.html#127-177

    Thread Starter DrHariri

    (@ala7lam)

    I am trying this on my live site, will let you know if the issue persists. Thanks Michael ??

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Are you using any extra addons or just the core BadgeOS plugin?

    Thread Starter DrHariri

    (@ala7lam)

    I have the core and:
    BadgeOS Sensei Add-On
    Leaderboards
    Messages

    However, the last 2 are not yet activated.

    There seems to be something off but I can’t tell from what. I am passing user meta fields to an external service normally but can’t seem to pass a value for the points anymore. for all of the other meta fields, I am passing them with profile update. Could this be related to how the points might be calculated for the admin?

    Thanks!

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Well, the snippet of code I pasted above is the only place I can find that updates the meta value with that key, from the core plugin. Now, it’s possible that the _badgeos_points key is getting set somehow elsewhere, even external plugins/themes/etc. However, since I don’t have the right access to what you’ve got going on, I can’t verify that.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Achievement Points show with Date?’ is closed to new replies.