The page you linked to describes how to add a web notification. The example on that page hooks to the bp_activity_sent_mention_email
action which means every time bp_activity_sent_mention_email
is executed, a web notification will be sent. In your case, you’d still use bp_notifications_add_notification()
to send the notification but you will want to send a notification to a particular member only if a friend of that member has a birthday.
The wp_schedule_event()
function might be helpful to you: https://codex.wordpress.org/Function_Reference/wp_schedule_event
Thanks Henry,
Unfortunately I struggle to understand how to produce the code, I’m not a code expert like you guys.
Here is what I have and how I would like to implement it for my friend’s birthday:

I have found this that mentioned the “bp_notifications_add_notification()” function:
BuddyPress: Adding Custom Notifications
That is for notifications when someone comments on their blog post, but it is far too complex for me to modify for birthdays I’m afraid 🙁
Any chance somebody could share the code?
Hi there,
I have extended profile (dashboard > User > Profile Fields) with birthday (day/month/year drop down menu).
How can a user receive notifications for his friends birthdays?
Found something here: :https://codex.buddypress.org/developer/function-examples/bp_notifications_add_notification/
but I don’t know how to modify code.
Could you please assist?
Yes, I also think the same. You are right!