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
}