I tried to add the below in the foreach loop in the function get_recipients but no luck
if ( 'topic' === $type )
{
$ID = $user->ID;
$author_id = bbp_get_topic_author_id( $topic_id );
$city_user = xprofile_get_field_data(‘City’, $author_id);
$city_author = xprofile_get_field_data(‘City’, $ID);
if ( $city_user === $city_author )
{
$recipients[$user->ID] = $user; // make sure unique recipients
}
}
else
{
$recipients[$user->ID] = $user; // make sure unique recipients
}
any ideas please?
-
This reply was modified 9 years, 9 months ago by aboood343. Reason: updating the code layout
Hope I made myself clear enough