Home Forums Newsletter Plugin Support The add_filter not worked.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #227884
    Anonymous
    Inactive

    I want to use hook, filter or action in function.php file when the subscriber change status (confirmed to unsubscribe or unsubscribe to confirmed).
    but I tried this filters and not worked. How can I do its?

    add_filter(“newsletter_user_subscribe”, “my_filter_newsletter_user_subscribe”, 10, 1);

    function my_filter_newsletter_user_subscribe($user) {
    // Change something
    return $user;
    }

    add_filter(“newsletter_user_confirmed”, “my_action_newsletter_user_confirmed”, 10, 1);

    function my_action_newsletter_user_confirmed($user) {
    // Do something
    }

    #227891
    Stefano
    Keymaster

    Hi, check if the double quotes are the regular ones, since from your code they seems not (but could be a forum problem).

    Stefano.

    #228010
    Anonymous
    Inactive

    I checked the double quotes and not found problem but It still not work.

    #229199
    Anonymous
    Inactive

    I changed add_filter(“newsletter_user_subscribe”, “my_filter_newsletter_user_subscribe”, 10, 1); to add_action( ‘newsletter_unsubscribed’, ‘my_filter_newsletter_user_subscribe’, 10, 1); and It worked.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
×