Add missing woocommerce_run_on_woocommerce_admin_updated hook for RemoteInboxNotificationsEngine scheduled action (#38159)
* Remove maybe_mark_complete usage * Add changelog * Add woocommerce_run_on_woocommerce_admin_updated hook * Add changelog * Fix lint
This commit is contained in:
parent
059d1de563
commit
4c9bcbc30e
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Add missing woocommerce_run_on_woocommerce_admin_updated hook for the scheduled action registered in RemoteInboxNotificationsEngine
|
|
@ -40,19 +40,20 @@ class RemoteInboxNotificationsEngine {
|
|||
|
||||
// Hook into WCA updated. This is hooked up here rather than in
|
||||
// on_admin_init because that runs too late to hook into the action.
|
||||
add_action( 'woocommerce_run_on_woocommerce_admin_updated', array( __CLASS__, 'run_on_woocommerce_admin_updated' ) );
|
||||
add_action(
|
||||
'woocommerce_updated',
|
||||
function() {
|
||||
$next_hook = WC()->queue()->get_next(
|
||||
'woocommerce_run_on_woocommerce_admin_updated',
|
||||
array( __CLASS__, 'run_on_woocommerce_admin_updated' ),
|
||||
array(),
|
||||
'woocommerce-remote-inbox-engine'
|
||||
);
|
||||
if ( null === $next_hook ) {
|
||||
WC()->queue()->schedule_single(
|
||||
time(),
|
||||
'woocommerce_run_on_woocommerce_admin_updated',
|
||||
array( __CLASS__, 'run_on_woocommerce_admin_updated' ),
|
||||
array(),
|
||||
'woocommerce-remote-inbox-engine'
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue