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 have a plugin filter that isn't working for me:

add_filter( 'gform_notification_email_3', 'route_notification', 10, 2 );
function route_notification($email_to, $entry) {
    global $post;
    $email_to = get_the_author_email();
    return $email_to;

I think the $email_to variable isn't being set properly, but how do I echo this variable out to check it?

share|improve this question
up vote 1 down vote accepted

Like usual. :) Works most of the time unless it ends up in some place that is not echoed to the screen by browser.

echo $email_to;

And for debug it is more informational to use var_dump(). Personally I usually use this to quickly add/remove dump to filter:

add_filter('filter','dump_filter',10,2); // or how much it passes, etc

function dump_filter($input) {


    return $input;
share|improve this answer

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.