Hooks and filters
gfmc_member_body
Change the request sent to Mailchimp.
add_filter( 'gfmc_member_body', function ( array $body, array $ctx ) {
$body['language'] = 'fr';
return $body;
}, 10, 2 );
$ctxhasentry,form,feed,audience,configandexists.- The plugin keeps its guarantees: the
email_addresscannot be changed,statusis removed (an existing contact is never resubscribed), andstatus_if_newmust besubscribed,pendingortransactional. - A value that is not an array is ignored. An exception in your filter fails that job with the message
filter_errorso the worker never stalls; use Retry after fixing it.
gfmc_skip_validation
Return true to let Mailchimp decide about required fields and incomplete addresses. The email check is never skipped, and skipped checks are still shown as warnings.
add_filter( 'gfmc_skip_validation', '__return_true' );
Actions
gfmc_sync_finished: after every final outcome of a job.gfmc_connected: after a successful Mailchimp connection.gfmc_worker_chain: when a run starts another run because jobs are still due.
Other filters: gfmc_manage_capability (who can manage the plugin, default manage_options).