bp_activity_add() not working in theme ajax hooks
-
I am trying to add an activity for the current user through a function hooked to wp_ajax
add_action(“wp_ajax_add_pair”, “some_function”);
function some_function(){
$args = array(‘action’=>’action string’);
bp_activity_add($args);
}some_function is called through ajax but I get bp_activity_add does not exist. This makes me think that BP hasnt loaded yet, but var_dump($bp) shows the variable is set. So need help to record activity for a user through ajax
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘bp_activity_add() not working in theme ajax hooks’ is closed to new replies.