a quick hack plugin to allow people to sign up for Mailtrain newsletters at WooCommerce checkout.
wootrain | ||
README.md |
WooTrain
a quick hack plugin to allow people to sign up for Mailtrain newsletters at WooCommerce checkout.
Install
- First, you'll need CheckoutFieldEditor installed and add a field with name
newsletter_
- Get your API key from Mailtrain
- Get your ListID from Mailtrain
- Edit line 28 in wootrain.php replacing your Mailtrain URL, Mailtrain list ID and mailtrain API key
$url = '[your mailtrain URL here]/api/subscribe/[your mailtrain list ID here]?access_token=[your mailtrain API key here]';
for example:
$url = 'https://mailtrain.example.come/api/subscribe/xxxxxx?access_token=xxxxxxxxxxxxxxxxx';
- Zip the
wootrain
folder in this repo - Navigate to Add Plugins in your Wordpress repo, click upload plugin, select wootrain.zip
- activate the plugin! :)