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

How do I send a notification when a post is published through WP REST API? #267

Open
aneeskhan47 opened this issue Mar 10, 2021 · 1 comment

Comments

@aneeskhan47
Copy link

aneeskhan47 commented Mar 10, 2021

Description:

Hi,

Does enabling Automatically send a push notification when I publish a post from 3rd party plugins apply to rest api?

i mean i use wp rest api create post endpoint, will onesignal send notification of it?
if answer is no then how can i make onesignal plugin to send notification when wp rest api create/update a published post?

I want notification to be sent when A post is created using a wp rest api

Steps to Reproduce Issue:

  1. create a post using wp rest api (use postman for example)
  2. check onesignal send notification when Automatically send a push notification when I publish a post from 3rd party plugins is enabled

Anything else:

NONE

@aneeskhan47 aneeskhan47 changed the title Send Notification when WP REST API creates/updates post How do I send a notification when a post is published through WP REST API? Mar 10, 2021
@rgomezp
Copy link
Contributor

rgomezp commented May 25, 2022

Howdy @aneeskhan47 ,
Apologies for the delay. Did you figure it out?

I wasn't able to find any resources stating whether or not the REST API would trigger the transition post status which is what is needed to trigger the OneSignal push notification.

From what I gathered, it seems that it should work since the transition post status event would occur on publish. However, I would need to do some digging/testing to know for sure.

Cheers

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

3 participants