a quick hack plugin to allow people to sign up for Mailtrain newsletters at WooCommerce checkout.
Go to file
2021-03-24 15:31:36 -04:00
wootrain first commit 2021-03-24 15:30:01 -04:00
README.md formatting 2021-03-24 15:31:36 -04:00

WooTrain

a quick hack plugin to allow people to sign up for Mailtrain newsletters at WooCommerce checkout.

Install

  1. First, you'll need CheckoutFieldEditor installed and add a field with name newsletter_
  2. Get your API key from Mailtrain
  3. Get your ListID from Mailtrain
  4. 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.com/api/subscribe/xxxxxx?access_token=xxxxxxxxxxxxxxxxx';

  1. Zip the wootrain folder in this repo
  2. Navigate to Add Plugins in your Wordpress repo, click upload plugin, select wootrain.zip
  3. activate the plugin! :)