gmd8 Posted May 22, 2010 Share Posted May 22, 2010 (edited) 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 May 27, 2010 by WHMCS Andrew User request 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted May 22, 2010 Share Posted May 22, 2010 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'; 0 Quote Link to comment Share on other sites More sharing options...
gmd8 Posted May 23, 2010 Author Share Posted May 23, 2010 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. 0 Quote Link to comment Share on other sites More sharing options...
dordal Posted May 24, 2010 Share Posted May 24, 2010 In that case, turn on error reporting (temporarily). Put this in your WHMCS configuration.php file error_reporting(E_ALL); $display_errors = true; $mysql_errors = true; 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted May 24, 2010 Share Posted May 24, 2010 Your reqire line should be inside the "add_to_mailchimp" function 0 Quote Link to comment Share on other sites More sharing options...
gmd8 Posted June 1, 2010 Author Share Posted June 1, 2010 I got everything fixed now and am going to test the addon in beta- things look good so far, so thanks for the help! 0 Quote Link to comment Share on other sites More sharing options...
orbixhost Posted July 18, 2010 Share Posted July 18, 2010 I saw you on sourceforge but there were no files around, how's the project going? Gj 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.