Upgrade 4.2.0 problem Action Scheduler
remcotolsma opened this issue · comments
Sorry for the late reply, Reüel. Just now deleted that record from the options table and refreshed the admin. Action is again added to schedule, but then fails again.
Pronamic Pay, Versie 9.5.1
WooCommerce, Versie 8.1.1I’ve seen the failed status after the action having been executed via WP Cron, via WP CLI and via Admin List Table. Every time the reason is:
“Scheduled action for pronamic_pay_schedule_woocommerce_upgrade_4_2_0 will not be executed as no callbacks are registered.”
https://wordpress.org/support/topic/failed-action-scheduler-hook/#post-17122366
Could this have something to do with the following code:
wp-pronamic-pay-woocommerce/src/Upgrade420.php
Lines 25 to 39 in b5dd328
If the wcs_get_subscription()
function does not exists the action hooks are not added. But the upgrade execution function schedules the actions anyway?
wp-pronamic-pay-woocommerce/src/Upgrade420.php
Lines 155 to 163 in b5dd328
Also see core:
https://github.com/pronamic/wp-pay-core/blob/529e6f2568a3e2fd380b23a08e32cf4b22af42a0/src/Admin/Install.php#L66-L91
Good catch! Resolved in 9c32d16.