Hook: mam_brevo_user_synced

Signature

do_action( 'mam_brevo_user_synced', int $user_id, array $result );
Parameter Type Description
$user_id int The WordPress user.
$result array status (synced), operation (upsert or update_email), code (Brevo HTTP status), message, contact_id (Brevo contact ID, 0 if unknown).

When it fires

Only after a successful create or update in Brevo. It does not fire when a user is skipped, when nothing changed, or when Brevo returned an error. Errors are in the Status and log panel and in the user’s mam_brevo_last_error meta.

It usually runs inside a WP-Cron job, so there is no logged-in user and no page output. Do not echo anything.


Example

add_action( 'mam_brevo_user_synced', function ( $user_id, $result ) {
    update_user_meta( $user_id, 'my_marketing_list_joined', 1 );
}, 10, 2 );

  • Hook: mam_brevo_sync_user
  • MAM Brevo Email Manager Overview

Metadata

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 action
Audience PHP developer
Last verified 2026-10-05
Was this article helpful?
Contents

    Need Support?

    Can't find the answer you're looking for? Don't worry we're here to help!