Signature
$defs = apply_filters( 'mam_brevo_attribute_definitions', array $defs );
| Parameter |
Type |
Description |
$defs |
array |
NAME => type. Starts with FIRSTNAME => 'text' and LASTNAME => 'text'. |
Types: text, date, float, boolean, or a category:
'STATUS' => array(
'type' => 'category',
'enumeration' => array(
array( 'value' => 1, 'label' => 'active' ),
array( 'value' => 2, 'label' => 'expired' ),
),
),
Behaviour
- Used only by Create missing attributes in Brevo (settings screen) and
wp mam-brevo attributes. It does not change what is sent.
- Attributes you send through
mam_brevo_contact_attributes but do not declare here still show up in the tool. Their type is guessed from a sample user’s value: true/false is boolean, a number is float, YYYY-MM-DD is date, anything else is text. Declare the type when the guess could be wrong, for example a date that is empty for the sample user.
- Attributes that already exist in Brevo are never changed.
- Names must be UPPER CASE letters, digits and underscores, starting with a letter.
Example
add_filter( 'mam_brevo_attribute_definitions', function ( $defs ) {
$defs['WEDDING_DATE'] = 'date';
$defs['PLANNER_CONNECTED'] = 'boolean';
$defs['PLAN'] = 'text';
return $defs;
} );
Related articles
- Hook: mam_brevo_contact_attributes
- MAM Brevo Email Manager Overview
| 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 |