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
Contact Creation Filters
wc_maileon_contact_update_checkout
...
Description
wc_maileon_createcontact_contact_params
WordPress filter hooks.
...
update_checkout
is a filter applied to a contact created on the checkout page.
Parameters
$contact
(Maileon\Contacts\Contact
) The contact to be filtered
$user_id
(integer
) The ID of the user
$data
(array
) The checkout data
$doi
(boolean
) Whether the DOI process is enabled
wc_maileon_contact_update_
...
registration
Description
wc_maileon_contact_update_contact_checkoutregistration
is a filter applied to a contact created on via the checkout pageregistration form.
Parameters
$contact
(Maileon\Contacts\Contact
) The contact to be filtered
$user_id
(integer
) The ID of the user
$user_data
(array
) The user data
$newsletter
(boolean
) Whether the user opted in to recieve newsletters$data(array
) The checkout data
wc_maileon_contact_update_
...
registration
Description
wc_maileon_contact_update_contact_registration
is a filter applied to a contact created via the registration form.
Parameters
$contact
(Maileon\Contacts\Contact
) The contact to be filtered
$user_id
(integer
) The ID of the user
$user_data
(array
) The user data
$newsletter
(boolean
) Whether the user opted in to recieve newsletters$user_data
(array
) The user data
wc_maileon_contact_update_
...
account
Description
wc_maileon_contact_update_contact_account
is a filter applied to an updated contacta contact updated through WooCommerce/My Account.
$contact
(Maileon\Contacts\Contact
) The contact to be filtered
$customer
(\WC_Customer
) (required) The customer data
$doi
(boolean
) Whether the DOI process is enabled
wc_maileon_contact_unsubscribe
...
_reasons
Description
wc_maileon_contact_unsubscribe_contact_reasons
is a filter applied to the unsubscription reasons supplied to Maileon.
$reasons
(array
) The unsusbcription reasons array
$user_id
(integer
) The unsubscrining unsubscribing customer
wc_maileon
...
_contact_{$context}_doi_mailing_key
Description
wc_maileon_create_contact_paramscontact_{$context}_doi_mailing_key
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
) 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 the DOI mailing keys supplied to Maileon. $context
is one of the following:
checkout
registration
account
$key
(array
) The DOI mailing key
Transaction Actions
wc_maileon_transaction_after_{$transaction_name}
Description
wc_maileon_transaction_after_{$transaction_name}
is an action running after every Maileon transaction. $transaction_name
is one of the following by default:
...
wc_maileon_transaction_name
Description
wc_maileon_transaction_name
is a filter applied to all Maileon transaction names.
...
wc_maileon_transaction_{$transaction_name}_attributes
Description
wc_maileon_transaction_{$transaction_name}_attributes
is a filter applied to all Maileon transaction attribute definitions. It can be used to modify the transaction types created by the plugin. $transaction_name
is one of the following by default:
...
wc_maileon_transaction_map_order_{$type}
Description
wc_maileon_transaction_map_order_{$type}
is a filter applied to each order_item in the default transaction mapping. $type
is one of the following:
...
wc_maileon_transaction_order_line_types
Description
wc_maileon_transaction_order_line_type
is a filter applied to the order item types.
...