[wp-trac] [WordPress Trac] #57589: transition_post_status hook does not fire when cron publishes scheduled post.

WordPress Trac noreply at wordpress.org
Tue Jan 31 00:54:09 UTC 2023


#57589: transition_post_status hook does not fire when cron publishes scheduled
post.
-------------------------------+------------------------------
 Reporter:  tele2rn            |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Cron API           |     Version:  6.1.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------
Changes (by peterwilsoncc):

 * keywords:   => reporter-feedback
 * severity:  major => normal


Comment:

 Hi @tele2rn and welcome to trac!

 I created a
 [https://gist.github.com/peterwilsoncc/d362704b29c516f99188dc5585fba0e2
 mini-plugin to test this issue] and have not been able to reproduce the
 issue.

 Running this plugin produced the expected log entries when the post was
 published as scheduled

 {{{
 [31-Jan-2023 00:40:01 UTC] PHP Notice:  transition_post_status in
 /vagrant/content/mu-plugins/nope-scheduled-post.php on line 5
 [31-Jan-2023 00:40:01 UTC] PHP Notice:  future_to_publish in
 /vagrant/content/mu-plugins/nope-scheduled-post.php on line 6
 }}}


 Saving a scheduled post also produced the expected entries


 {{{
 [31-Jan-2023 00:46:37 UTC] PHP Notice:  transition_post_status in
 /vagrant/content/mu-plugins/nope-scheduled-post.php on line 5
 [31-Jan-2023 00:46:37 UTC] PHP Notice:  future_post in /vagrant/content
 /mu-plugins/nope-scheduled-post.php on line 7
 }}}

 Are you able to reproduce the issue on a WordPress install running a
 default theme with only the test plugin installed?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57589#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list