Using BNFW with the WP REST API

If you want to use the WP REST API with BNFW then it is possible but you must make sure the following rules are adhered to.
The below uses the ‘New Post Published’ notification as an example and all steps are essential:

  1. Create a new post with the ‘author’ argument set to a valid user ID.
  2. Set the status to ‘draft’.
  3. Run this command and ensure you note the post ID.
  4. Immediately update the post with this post ID with a status of ‘publish’.

If you wanted to trigger a ‘Post Updated’ notification then just change the status of a post to ‘update’, again making sure that the author argument is set to a valid user ID.

Subscribe for BNFW News

Want to know when new add-ons or features are released? Sign up to the newsletter. No spam, ever. Unsubscribe at any time.

Please enter your name.
Please enter a valid email address.
Something went wrong. Please check your entries and try again.