[Resolved] $new_status get overridden when add_filter is called twice
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’..)
- The topic ‘[Resolved] $new_status get overridden when add_filter is called twice’ is closed to new replies.