Signature
$list_ids = apply_filters( 'mam_brevo_contact_list_ids', array $list_ids, int $user_id );
| Parameter |
Type |
Description |
$list_ids |
int[] |
Starts with the list chosen on the settings screen (empty when none is chosen). |
$user_id |
int |
The WordPress user being synced. |
Return an array of Brevo list IDs. Duplicates and non-numbers are removed.
Behaviour
- Brevo adds the contact to these lists. It does not remove the contact from lists that are not in the array. To move people between groups, an attribute plus a Brevo segment is usually simpler than moving them between lists.
- The same list IDs are used when a user is deleted and the delete setting is “Remove the contact from the list(s)”.
- The list ID is the number shown in Brevo under Contacts > Lists.
Example
add_filter( 'mam_brevo_contact_list_ids', function ( $list_ids, $user_id ) {
$user = get_userdata( $user_id );
if ( $user && in_array( 'wedding-planner', (array) $user->roles, true ) ) {
$list_ids[] = 12; // "Planners" list.
}
return $list_ids;
}, 10, 2 );
Related articles
- MAM Brevo Email Manager Overview
- Hook: mam_brevo_contact_attributes
| Field |
Value |
| Article type |
Hook Reference |
| Plugin slug |
mam-brevo-email-manager |
| Applies to plugin version |
26.41.1+ |
| Category |
Extending MAM Suite |
| Hook type |
filter |
| Audience |
PHP developer |
| Last verified |
2026-10-05 |