Title: Modifying a webhook to update interests (PHP)
Last modified: January 24, 2018

---

# Modifying a webhook to update interests (PHP)

 *  Resolved [nerdyvampire](https://wordpress.org/support/users/nerdyvampire/)
 * (@nerdyvampire)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-26/)
 * Hi guys. First off, if this is beyond the support you want to offer, that is 
   totally fine, I don’t want to step on your toes, you seem cool.
    I am trying 
   to modify the filter from [ Danny’s code](https://github.com/ibericode/mc4wp-snippets/blob/master/add-ons/user-sync/groupings.php)
   so the interests are properly set after sync, however I am experiencing that 
   my website fails when I replace functions.php with a file including my new filter.
 * Here is [my code](https://pastebin.com/5DGBdFsD) . The words are Danish, but 
   the comments should be explanatory.
 * If you can see what I’m doing wrong I’d appreciate it. I have a notion that my
   newbieness might cause some obvious mistake.
    But again, I don’t want to waste
   your time if this is beyond what you do.
    -  This topic was modified 8 years, 4 months ago by [nerdyvampire](https://wordpress.org/support/users/nerdyvampire/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Contributor [Lap](https://wordpress.org/support/users/lapzor/)
 * (@lapzor)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-26/#post-9904575)
 * What is the exact error message in the Apache/PHP log when the website fails?
 *  Thread Starter [nerdyvampire](https://wordpress.org/support/users/nerdyvampire/)
 * (@nerdyvampire)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-26/#post-9908446)
 * I did not know I could access that log 😮 I will try and access it monday, from
   my work PC.
 *  Plugin Contributor [Lap](https://wordpress.org/support/users/lapzor/)
 * (@lapzor)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-26/#post-9909908)
 * If you don’t know how/where to access that log you can ask your hosting provider
   about this.
 *  Thread Starter [nerdyvampire](https://wordpress.org/support/users/nerdyvampire/)
 * (@nerdyvampire)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-26/#post-9912614)
 * Hey Lap, thanks for your advice so far. Here’s an update.
    I found the error 
   in my code (turns out => isn’t the same as ->). So far so good, but it still 
   doesn’t modify the interests of the users I try to add to the MailChimp list.
   Not even when I directly try to set one of the interests to true, so that’s what
   I’m working on now. To figure it out I want to find a way to examine the API 
   call MailChimp got, if I can figure out a way to do that.
 *  Plugin Contributor [Lap](https://wordpress.org/support/users/lapzor/)
 * (@lapzor)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-26/#post-9942958)
 * MailChimp has some limited logs on the API in the same screen where you generate
   the API keys in your MailChimp.com account, on the bottom of the page.
 * Since there have been no replies for awhile I will now mark this ticket as “resolved”.
   If you are still experiencing this issue or you have a similar problem, please
   create a NEW ticket. Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Modifying a webhook to update interests (PHP)’ is closed to new replies.

 * ![](https://ps.w.org/mailchimp-for-wp/assets/icon-256x256.png?rev=1224577)
 * [MC4WP: Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp-for-wp/reviews/)

## Tags

 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 5 replies
 * 2 participants
 * Last reply from: [Lap](https://wordpress.org/support/users/lapzor/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/php-26/#post-9942958)
 * Status: resolved