Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

Users can sign up for Maileon newsletters by checking the checkbox on the checkout page. Users who haven’t checked this checkbox will also be created in Maileon, however they will not have any permissions. This is due to the fact that the user needs to exist in order for Maileon to send transactional emails.

The user creation process can be hooked into vie the wc_maileon_checkout_contact and wc_maileon_create_contact_params WordPress filter hooks.

wc_maileon_update_contact_checkout

Description

wc_maileon_update_contact_checkout is a filter applied to a contact created on the checkout page.

Parameters

$contact
(Maileon\Contacts\Contact) (required) The contact to be filtered

$user_id
(integer) The ID of the user

$newsletter
(boolean) Whether the user opted in to recieve newsletters

$data
(array) The checkout data

wc_maileon_update_contact_registration

Description

wc_maileon_update_contact_registration is a filter applied to a contact created via the registration form.

Parameters

$contact
(Maileon\Contacts\Contact) (required) The contact to be filtered

$user_id
(integer) The ID of the user

$newsletter
(boolean) Whether the user opted in to recieve newsletters

$user_data
(array) The user data

wc_maileon_update_contact_account

wc_maileon_update_contact_account is a filter applied to an updated contact.

$contact
(Maileon\Contacts\Contact) (required) The contact to be filtered

$customer
(\WC_Customer) (required) The customer data

wc_maileon_unsubscribe_contact_reasons

wc_maileon_unsubscribe_contact_reasons is a filter applied to the unsubscription reasons supplied to Maileon.

$reasons
(array) (required) The unsusbcription reasons array

$user_id
(integer) (required) The unsubscrining customer

wc_maileon_create_contact_params

Description

wc_maileon_create_contact_params is a filter applied to any contact creation Maileon API calls. The hook receives an array of parameters that are passed to the Maileon API. The array contains the following elements:

Parameters

contact
(Maileon\Contacts\Contact) (required) The contact to be created

syncMode
(Maileon\Contacts\SynchronizationMode) The synchronization mode

src
(string) Subscription source

subscriptionPage
(string) Subscription page

doi
(boolean) Start doi process

doiPlus
(boolean) Enable doi plus

doiMailingKey
(string) The doi mailing key

  • No labels