WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. llch
    Member
    Posted 1 year 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'..)

    http://wordpress.org/extend/plugins/edit-flow/

  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year 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

About this Topic

Tags