Chron job for link clicks not working
-
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.
- The topic ‘Chron job for link clicks not working’ is closed to new replies.