PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

add_action stopped working

  1. pmannle
    Member

    For some reason, it seems my add_action has stopped working. I'm using both an add_filter, and an add_action in my functions.php page, and both were working beautifully last week. I've even tried reverting the site back to previous versions, but to no avail. Currently, the add_filter is still working, but I can't get any response out of the add_action.

    Even if I just put a echo within the function called, I get no response to the screen.

    Any help or method to debug would be greatly appreciated! (I've totally disabled the calling feature until I can get a response out of the form).

    What could be the reason's this doesn't work? Or, what is the best way to debug?

    functions.php

    add_action("gform_after_submission_1", "post_free_meter", 10, 2);
    function post_free_meter($entry, $form) {
    
    	echo "<h1> TEST FREE METER ADD ACTION </h1>" ;
    
    }
    Posted 12 years ago on Tuesday April 23, 2013 | Permalink
  2. pmannle
    Member

    I just upgraded to the latest version of Gravity Forms -- still can't get the add_action("gform_after_submission", ...) to work....

    Posted 12 years ago on Tuesday April 23, 2013 | Permalink
  3. pmannle
    Member

    OK, I was able to fix this.... the trick is not to try and use the echo command within the function called from the add_action("gform_after_submission",...) -- it WONT print to the screen. So, even though my post_free_meter($entry, $form) function was being called, I was unable to diagnose the issue using an echo.

    This is what made it hard to debug for me.

    Posted 12 years ago on Tuesday April 23, 2013 | Permalink
  4. Glad you got it sorted out. Thanks for letting us know.

    Posted 12 years ago on Wednesday April 24, 2013 | Permalink

This topic has been resolved and has been closed to new replies.