Open toobhed opened 4 years ago
I want to access the user id and achievement id when an award is revoked. To test this and see what is being passed, I am making a database insert.
function check_award($user_id, $achievement_id) { global $wpdb; $wpdb->insert("wp_drl", array("results" => 'action called USER ID:' . $user_id . ' ACHIEVEMENT:' . $achievement_id) ); } add_action( 'badgeos_revoke_achievement', 'check_award', 10, 2 ); do_action( 'badgeos_revoke_achievement', $user_id, $achievement_id );
The row in the database ends up like this, no values for variables.: action called USER ID: ACHIEVEMENT:
What am I missing? Not having any issue doing something similar with badgeos_award_achievement
I want to access the user id and achievement id when an award is revoked. To test this and see what is being passed, I am making a database insert.
function check_award($user_id, $achievement_id) { global $wpdb; $wpdb->insert("wp_drl", array("results" => 'action called USER ID:' . $user_id . ' ACHIEVEMENT:' . $achievement_id) ); } add_action( 'badgeos_revoke_achievement', 'check_award', 10, 2 ); do_action( 'badgeos_revoke_achievement', $user_id, $achievement_id );
The row in the database ends up like this, no values for variables.: action called USER ID: ACHIEVEMENT:
What am I missing? Not having any issue doing something similar with badgeos_award_achievement