On this line here:
$list = \MailPoet\API\API::MP('v1')->getLists()[0][id];
You’re missing quotes around id
, so $list
isn’t being set to the ID. You need to add quotes:
$list = \MailPoet\API\API::MP('v1')->getLists()[0]['id'];
On this line here:
$list = \MailPoet\API\API::MP('v1')->getLists()[0][id];
You’re missing quotes around id
, so $list
isn’t being set to the ID. You need to add quotes:
$list = \MailPoet\API\API::MP('v1')->getLists()[0]['id'];