WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having a problem with wordpress. I have created some shortcodes in wordpress. None of them use hyphens as suggested by the wordpress codex.

One is for validating a user email (just a success or fail) in which in case of success, I add this e-mail address to a mailchimp mailing list.

Antother is just to test mailchimp subscription functionality.

Problem is that when the user validation page is executed it always fires the mail no matter what. If I remove the shortcode in the test page, this stops.

I am really puzzled.

Here is the full code: http://pastebin.com/7wHwxc5q

share|improve this question
maybe take your api key out of your code, just so noone could take advantage out of this. – woony Aug 29 '12 at 10:21
obviously that is not the real api key... – andres Aug 29 '12 at 10:47
yeah, I was to quick – woony Aug 29 '12 at 11:00

in your test you do this.

line117 of pastebin
 $retval = $api->listSubscribe($listId, 'my@mail.com' );

which most likely will do the subscribe and send the email? or am I missing something? so whenever you call your flashusers_chimptest.php it is subscribed no matter what.

share|improve this answer
but I'm not calling flashusers_chimptest.php in the other shortcode, so it should not get fired – andres Aug 29 '12 at 10:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.