Hi Nicholas,
that would be exactly the case it should cover and wp_insert_post()
should trigger the Post added notification.
Let me try to reproduce this on the new 8.0.0 version which should be released within a week. If I discover the issue I’ll patch it before the release.
If it will work that means you may execute that function too early before our plugin initializes. In the v7 that should be later than init 1000
. v8 won’t have that issue.
Hi Kuba,
I’m actually just running it, for testing purposes, in the footer front-end template of the theme.
The Post draft trigger works fine, the add one doesn’t.
Thank you!
That’s definitely not the timing issue, then! I’m on it.
Ok, I tried to replicate this issue and I couldn’t.
I’ve set up a notification with the Post added
trigger and in footer.php
of the Twenty Twenty theme I added:
wp_insert_post( [
'post_title' => 'Front',
'post_content' => 'Content',
] );
and that triggered it successfully.
There’s a chance new version of the plugin will solve that issue as I was testing the dev build from this branch.
Yes indeed, the 8.0 release branch works. Perfect, I’ll wait for the release.
Thank you, awesome support!
Awesome!!
If you could spare 1 minute to write a review it would be much appreciated 🙂