Execute bp_activity_add_user_favorite function
-
Hi. I’m developing a plugin for Buddypress where I’d like to utilize the bp_activity_add_user_favorite function.
I’m executing a PHP function (via AJAX) when a user clicks on a button. Within that function I’m calling bp_activity_add_user_favorite as follows:
do_action( ‘bp_activity_add_user_favorite’, $activity_id, $user_id );I’ve verified that I have both valid $activity_id and $user_id values (matching up to actual db records), but bp_activity_add_user_favorite doesn’t seem to be executing because the favorite in question isn’t saving for that user. It’s my understanding that bp_activity_add_user_favorite will populate both the bp_activity_meta and user_meta tables respectively. First, is that correct, and any ideas why this might not be executing?
Thanks in advance for anyone’s insight!
You must be logged in to reply to this topic.