• I’m looking to call the API from outside of the plugin (in the theme).

    I am trying to call it in the following way:

    $subscribed = \MailjetPlugin\Includes\MailjetApi::checkContactSubscribedToList($email, $mailjet_sync_list);

    However I get the following not found message:

    “Uncaught Error: Class ‘MailjetPlugin\Includes\MailjetApi’ not found in ….”

    I’ve tried requiring the plugin files first, to no avail:
    require_once $_SERVER[‘DOCUMENT_ROOT’]. ‘/wp-content/plugins/mailjet-for-wordpress/vendor/autoload.php’;
    require_once $_SERVER[‘DOCUMENT_ROOT’]. ‘/wp-content/plugins/mailjet-for-wordpress/src/includes/MailjetApi.php’;
    require_once $_SERVER[‘DOCUMENT_ROOT’]. ‘/wp-content/plugins/mailjet-for-wordpress/src/includes/Mailjet.php’;

    Any ideas?

Viewing 1 replies (of 1 total)
  • Hi ! Had the same error as you when trying to send a test. I think there is a bug with the 5.2.20.

    Downgraded to 5.2.19 (which is written as 5.2.18 in dashboard… anyway…), no more error with tests.

    Hope it will help

Viewing 1 replies (of 1 total)
  • The topic ‘Calling the API from outside the plugin’ is closed to new replies.