Edit Flow
[resolved] $new_status get overridden when add_filter is called twice (2 posts)

  1. llch
    Posted 3 years ago #

    I have these two filters in place for 'ef_notification_status_change' filter:

    add_filter( 'ef_notification_status_change', 'efx_auto_subscribe_usergroup', 10, 3 );
            add_filter( 'ef_notification_status_change', 'efx_custom_status_email', 10, 3 );

    In efx_auto_subscribe_usergroup(), the $new_status is correct.

    When echo $new_status in efx_custom_status_email(), it prints "1" instead of the correct status.

    The only workaround for more than one filter working is to use a separate one, i.e. add_filter( 'ef_notification_post_status_change'..)


  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 3 years ago #

    Sorry :( efx_auto_subscribe_usergroup() should be returning $new_status instead of true. I've updated the example.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Edit Flow
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic