Jump to content

Error With WHMCS Integration of MailChimp API


gmd8

Recommended Posts

Hi There- I'm testing the code below to act as an automatic hook to register any new users in WHMCS to MailChimp through their API. When I've made sure it works, I plan on giving it out as a free hook for WHMCS! Anyway, I've placed this file, called add_to_mailchimp.php, in the /includes/hooks folder of WHMCS along with the MCAPI.class.php file which it depends on to work. However, when I run the file in WHMCS directly, I get the error that add_hook is an undefined function. What am I doing wrong? Am I missing something?

 

Thanks for the help anybody can offer!

 

The code:

 

code removed

Edited by WHMCS Andrew
User request
Link to comment
Share on other sites

create a mailchimp directory in the includes/hooks directory like this includes/hooks/mailchimp and place the MCAPI.class.php file in there.

Then change your include to

require_once 'mailchimp/MCAPI.class.php';

 

Thanks for the reply. I tried that and now all of my WHMCS install's pages are blank.

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated