Hello, I am trying to add some meta info to a new activity that is being created. For that I use the bp_acitivy_add hook, but I can not figure out how get the id of the activity that is being created. I used bp_get_activity_id() but it doesn’t work, but if I put a random integer it works.
function my_acitivity_meta(){
bp_activity_add_meta(bp_get_activity_id() , 'metaKey', 'metaValue' );
}
add_action('bp_activity_add', 'my_activity_meta');
There is a way to get the id of the activity that is being created?.