• Resolved gorvie

    (@gorvie)


    Hi, id like to reset “click link” links after 24 hours so user can claim points again (every 24 hours)

    Im using:

    [mycred_link amount=100 href=”https://website.com/”%5DCLICK HERE[/mycred_link]

    AND

    add_action( ‘mycred_reset_key’, ‘mycredpro_daily_removal_link_click_entries’ );
    function mycredpro_daily_removal_link_click_entries() {

    global $wpdb;

    // Use mycred() to get the log table name
    $mycred = mycred();

    // Delete all link click log entries that are over 24 hours old
    $wpdb->query( $wpdb->prepare( “DELETE FROM {$mycred->log_table} WHERE ref = ‘link_click’ AND time < %d;”, ( current_time( ‘timestamp’ ) – DAY_IN_SECONDS ) ) );

    }

    Any idea why its not resetting every 24 hours?

    Wont let me click after set amount

    Thanks.

    • This topic was modified 4 years, 7 months ago by gorvie.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter gorvie

    (@gorvie)

    [mycred_link amount=100 href=”https://website.com/”%5D<span style=”color: #0000ff;”>CLICK HERE</span>[/mycred_link]

    This is the code..

    Hi @gorvie,
    Thank you for contacting us, myCred cron action “mycred_reset_key” has some issues We will be releasing an update on the coming Tuesday this fix will be included in the upcoming update.

    Thanks!

    Thread Starter gorvie

    (@gorvie)

    Ok, also i noticed Ranks is not working correctly. A user has earned the amount of points to level up rank but it does not update. Just stays at first rank..

    Thanks

    Hi @gorvie,

    If the user points exceed all the rank requirements/threshold then it will not reward the user with the rank.

    Thread Starter gorvie

    (@gorvie)

    I have it set like this:

    Hustler 1000 – 2500
    Newbie 0 – 1000

    A user was rewarded points by excessively hitting the link button.

    Here’s his current stats:
    Total: 2,550
    Rank: Newbie

    Hi @gorvie,

    As we have described above 2550 doesn’t lie in any ranks threshold that’s why the events are unable to trigger and users are stuck at the rank which they had before. You need to create a rank which covers the value for 2550 points.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Chron job for link clicks not working’ is closed to new replies.