Manual unsubscribe issue by calling hook
-
Hello.
I am trying to unsubscribe a user when a certain action happen.
I am using this code
do_action( 'mailchimp_sync_unsubscribe_user', $userID, $userEmail );
I wrote the code like that because as far as I checked your ‘unsubcribe_user’ function userID and userEmail are required (I also have an error in the logger that I didn’t supplied an email addressI also checked when you do the add_action thing and I think this is where the problem is
add_action( self::EVENT_PREFIX . 'unsubscribe_user', array( $this, 'unsubscribe_user' ) );
On add action if nothing is specified the default arg value is 1, and the function expects 2 required args. I solved this my self in the plugin, but for other users and a future version, it will be great if this will be fixed.Thanks.
- The topic ‘Manual unsubscribe issue by calling hook’ is closed to new replies.