WooTrain/README.md

24 lines
886 B
Markdown
Raw Permalink Normal View History

2021-03-24 19:21:16 +00:00
# WooTrain
2021-03-24 19:30:01 +00:00
a quick hack plugin to allow people to sign up for Mailtrain newsletters at WooCommerce checkout.
## Install
1. First, you'll need [CheckoutFieldEditor](https://woocommerce.com/products/woocommerce-checkout-field-editor/) 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
2021-03-24 19:30:45 +00:00
2021-03-24 19:30:01 +00:00
```$url = '[your mailtrain URL here]/api/subscribe/[your mailtrain list ID here]?access_token=[your mailtrain API key here]';```
2021-03-24 19:36:18 +00:00
should look sooomething like:
2021-03-24 19:30:01 +00:00
2021-03-24 19:31:36 +00:00
```$url = 'https://mailtrain.example.com/api/subscribe/xxxxxx?access_token=xxxxxxxxxxxxxxxxx';```
2021-03-24 19:30:01 +00:00
5. Zip the `wootrain` folder in this repo
6. Navigate to Add Plugins in your Wordpress repo, click upload plugin, select wootrain.zip
7. activate the plugin! :)