Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 877 Bytes

README.md

File metadata and controls

41 lines (27 loc) · 877 Bytes

Mailchimp Feature

This is a mailchimp integration for the Wordpress development framework "Flynt"

Installation

  1. Make sure to install the required composer packages
composer require drewm/mailchimp-api bdbch/vivalidator
  1. Clone or download this folder into your Flynt themes feature folder. For example:
/path/to/your/flynt-project/web/app/themes/your-theme/Features/Mailchimp
  1. Add the following line to your projects Init.php in theme/lib:
add_theme_support('flynt-mailchimp');
  1. Add the Mailchimp API Key in the Feature option page

Now you're ready to use the Mailchimp Feature in your project

Usage

<?php

use Flynt\Features\Mailchimp\Instance;

function subscribeUserToNL($listId, $email)
{
  $MailchimpInstance = new Instance();
  $result = $MailchimpInstance->subscribeToList($listId, $email, 'pending');
}