Plugin Overview
Installation
To install the plugin download the latest version from Plugin Files and extract the folder woocommerce-maileon
to your /wp-contents/plugins
directory. You should have a wp-contents/plugins/woocommerce-maileon
folder after successfully extracting the plugin files.
After copying the plugin files the plugin should be enabled in your plugin settings.
This plugin works in conjunction with the Maileon for WordPress plugin.
If you would like to recover abandoned carts using this plugin please see Cart Abandonment using ShopMagic for more information.
Configuration
After installing and enabling the plugin you should be able to configure it using the WordPress Admin settings area. The settings for the plugin are available under the settings menu WooCommerce Maileon
, or on the WooCommerce Maileon Settings
tab in the Maileon plugin settings menu.
General Settings
In this area you can define the general settings of the plugin.
API key (only available if Maileon for WordPress is not installed)
The API key associated with your Maileon account.
Base URI (only available if Maileon for WordPress is not installed)
The base URI for accessing the API of your Maileon account. This does not need to be changed in the majority of cases.
Enable Maileon transactions
The option allows Maileon to replace some WooCommerce emails with Maileon transactional emails. After enabling the option Maileon transactions can be dispatched instead of the built-in WooCommerce emails. You can see the replaced emails in the WooCommerce Email settings area:>> WordPress Admin > WooCommerce > Settings > Emails
In the default configuration all emails relating to an order’s status change can be augmented with Maileon transactions. It is possible to enable/disable the dispatching of these by clicking on the Manage
button in the WooCommerce email settings table.
In each email’s settings there is an area that makes it possible to configure the related Maileon transactions:
Enable/Disable
Disable the sending of this transaction using Maileon.
Replace Email
Fully replace the WooCommerce email sending with Maileon. Choosing this option means that only Maileon transactions will be dispatched and the default emails will not be sent by WooCommerce. The content of these emails can be specified using the Maileon GUI.
If this option is disabled WooCommerce will still send emails and a transaction will be created in Maileon as well.
Transaction Name
This is the name of the transaction in Maileon. Setting multiple WooCommerce emails to use the same transaction is possible, however it will only work if the structure of those Maileon transactions are the same (eg.: multiple order status changes).
By default all Maileon transactions follow the the structure outlined by https://dev.maileon.com/api/implementation-guideline/implementation-guidelines-transactions/implementation-guidelines-order-confirmation
For details please see Transaction Attributes Overview.
Initial permission level
The initial permission level for Maileon Contacts created through this plugin. If you have a DOI process enabled leave this on None
as the DOI confirmation will set the appropriate permission after the contact has confirmed their address.
Enable DOI process
Whether to start a DOI process for contacts created through the plugin.
DOI process with DOI plus
Whether the DOI process should award a DOI plus permission after completion.
Custom DOI mailing key
The mailing key for the custom DOI mailing for contact creation.
Developer Note: this can be overridden for each context using a filter hook.
Checkout Settings
In this area you can configure settings for the WooCommerce Checkout.
Display newsletter checkbox
Whether to show a newsletter subscription checkox on the checkout page. For registered users this checkbox is only shown if they haven’t yet confirmed the subscription.
Label for newsletter checkbox
The label for the checkbox shown at checkout. This label can include HTML tags, so it can be used to link to your privacy policy.
Example: Subscribe to our newsletter. Read our <a href=”link to the policy”>Privacy Policy</a>
Position on page
The position for the subscription checkbox on the checkout page.
Account Settings
In this area you can configure settings for the WooCommerce My Account.
Display in My account/Account details
Whether to show the newsletter area in the Account details page of the WooCommerce My Account area.
Label for newsletter checkbox
The label for the checkbox shown in the My Account area.
Registration Settings
In this area you can configure settings for the WooCommerce user registration form.
Display newsletter checkbox
Whether to show the newsletter subscription checkbox for the user registration area.
Label for newsletter checkbox
The label displayed in the registration form.
Custom Endpoints for Maileon
In this area you can find a couple of useful endpoints for Maileon. These can be used to integrate dynamic product information into Maileon for automations for example. For more information on how to use these please contact your Maileon distributor.
Related products
The related products endpoint returns a list of WooCommerce cross- and upsell products for a given product ID.
Calling the URL above results in a JSON output similar to the following (given that the product in question has cross- and upsells defined):
{
"upsells": [{
"sku": "Woo-beanie-logo",
"product_id": 32,
"title": "Beanie with Logo",
"description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",
"short_description": "This is a simple product.",
"url": "http:\/\/woocommerce.maileon.hu\/product\/beanie-with-logo\/",
"image_url": "http:\/\/woocommerce.maileon.hu\/wp-content\/uploads\/2020\/05\/beanie-with-logo-1.jpg",
"status": "instock",
"single_price": 18,
"categories": "19",
"width": "",
"height": "",
"weight": "",
"attributes": {
"pa_color": ["red"]
}
}],
"cross_sells": [{
"sku": "woo-belt",
"product_id": 16,
"title": "Belt",
"description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",
"short_description": "This is a simple product.",
"url": "http:\/\/woocommerce.maileon.hu\/product\/belt\/",
"image_url": "http:\/\/woocommerce.maileon.hu\/wp-content\/uploads\/2020\/05\/belt-2.jpg",
"status": "instock",
"single_price": 55,
"categories": "19",
"width": "",
"height": "",
"weight": "",
"attributes": []
}, {
"sku": "woo-hoodie",
"product_id": 12,
"title": "Hoodie",
"description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",
"short_description": "This is a variable product.",
"url": "http:\/\/woocommerce.maileon.hu\/product\/hoodie\/",
"image_url": "http:\/\/woocommerce.maileon.hu\/wp-content\/uploads\/2020\/05\/hoodie-2.jpg",
"status": "instock",
"single_price": 42,
"categories": "18",
"width": "",
"height": "",
"weight": "",
"attributes": {
"pa_color": ["blue","green","red"],
"logo": ["Yes","No"]
}
}]
}
The items above follow the structure outlined for Order Items
by Transaction Attributes Overview. The quantity
and total
properties are omitted for related products.
Webhook settings for Maileon
To properly synchronize Maileon contact status to WooCommerce user newsletter status you should set up Maileon webhooks. This should be available in your Maileon account settings in the Webhooks section. If you require further assistance with setting this up, please contact your Maileon distributor.
Currently the DOI confirmation and Unubscription webhooks are supported. The settings for each are shown in the settings area:
For advanced customization please see the Developer Documentation.
User Synchronization
The plugin provides the ability to synchronize WordPress user meta data changes to Maileon contact properties. The feature can be configured under WooCommerce Maileon > User Synchronization
.
To define a new field association filter click the New association
button under Contact field association
. This opens the editor.
Here you can select the Source User Meta
to be synchronized, and the Target Contact Property
that will be associated with it.
RSS feeds
The plugin also provides the ability to create custom Maileon compatible RSS feeds. You can create filtered list of products and reference them in Maileon. The RSS feeds are available under WooCommerce Maileon > Manage RSS feeds
.
To use a feed defined here simply copy the link in the Link
column, and use that as Maileon RSS SmartContent. For more information about how to set this up in Maileon please contact your Maileon distributor.
There are two filters defined by default:
All products - display a feed of all shop products
All products in stock - display a feed of all products that are in stock
To define a custom filter click the New configuration
button under RSS configuration
. This opens a filter editor.
To add a filter criteria select it from the dropdown near the Add filter
button and then click the button. Then use the input in the settings column for the given criteria to edit the settings.
After you have defined your configuration don’t forget to save it by clicking the Save configuration
button.
After the configuration was saved it should appear in the list of configurations.
Using the newly created configuration you can get the same list of products in Maileon by using the feed link:
The available fields in this RSS are the following for each product:
Title - The name of the product
Description - The short description of the product
Content - The full description of the product
Link - The link to the product page
Image - The full resolution image for the product
Custom properties (maileon:):
sku - The product SKU
product_id - The ID of the product
status - The stock status of the product: instock/outofstock
single_price - The price of the product
categories - A comma separated list of categories for the product (e.g.: Accessories, Clothing)
width - Product width (if available)
height - Product height (if available)
weight - Product weight (if available)
attributes - A comma separated list of product attributes (e.g.: Product Color: Red, Logo: Yes)
Sample RSS item
<item>
<title>
<![CDATA[The name of the product]]>
</title>
<description>
<![CDATA[The short description of the product]]>
</description>
<link>http://woocommerce.maileon.hu/product/beanie-with-logo/</link>
<enclosure type="image/jpeg" url="http://woocommerce.maileon.hu/wp-content/uploads/2020/05/beanie-with-logo-1.jpg" length="45371"/>
<content:encoded>
<![CDATA[The full description of the product]]>
</content:encoded>
<guid>http://woocommerce.maileon.hu/product/beanie-with-logo/</guid>
<maileon:sku>
<![CDATA[Woo-beanie-logo]]>
</maileon:sku>
<maileon:product_id>
<![CDATA[32]]>
</maileon:product_id>
<maileon:status>
<![CDATA[instock]]>
</maileon:status>
<maileon:single_price>
<![CDATA[18]]>
</maileon:single_price>
<maileon:categories>
<![CDATA[Accessories]]>
</maileon:categories>
<maileon:width>
<![CDATA[]]>
</maileon:width>
<maileon:height>
<![CDATA[]]>
</maileon:height>
<maileon:weight>
<![CDATA[]]>
</maileon:weight>
<maileon:attributes>
<![CDATA[Product Color: Red]]>
</maileon:attributes>
</item>
Status
This area can be used to diagnose problems with this plugin. It is found under WooCommerce Maileon > Status
. Among other things it lists possible issues with the plugin, any recent errors that have happened, and provides an interface for testing all the defined transactional emails.