Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apple_news_notice_message filter doesn't fire #1118

Open
rversantos opened this issue May 9, 2024 · 1 comment
Open

apple_news_notice_message filter doesn't fire #1118

rversantos opened this issue May 9, 2024 · 1 comment

Comments

@rversantos
Copy link

rversantos commented May 9, 2024

Description

I'm trying to use apple_news_notice_message filter to customize skip push messages for posts that are not pushed to apple news, but the filter is never trigged and we always the default message saying "Skipped push of article XXX due to the apple_news_skip_push filter."

I'm using like this:

    add_filter('apple_news_notice_message', [__CLASS__, 'filterSkipMessages'], 10, 2);

    public static function filterSkipMessages(string $message, string $type): string
    {
        <Logic to tweak the message here>

        return $message
    }

Am I doing something wrong?
Found the filter here: https://github.com/alleyinteractive/apple-news/wiki/Filter:-apple_news_notice_message

@kevinfodness
Copy link
Member

Where are you seeing the message? Is it in the post editor or in another area of the admin? If you're using the block editor (Gutenberg) and are seeing this on the post edit screen, I don't believe this filter fires in that context (it's using snackbar notifications via JavaScript instead).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants