ActionScheduler_AdminView::maybe_check_pastdue_actions()
Action: admin_notices
Maybe check past-due actions, and print notice.
Method of the class: ActionScheduler_AdminView{}
Hooks from the method
Return
null
. Nothing (null).
Usage
$ActionScheduler_AdminView = new ActionScheduler_AdminView(); $ActionScheduler_AdminView->maybe_check_pastdue_actions();
ActionScheduler_AdminView::maybe_check_pastdue_actions() ActionScheduler AdminView::maybe check pastdue actions code WC 9.5.1
public function maybe_check_pastdue_actions() { // Filter to prevent checking actions (ex: inappropriate user). if ( ! apply_filters( 'action_scheduler_check_pastdue_actions', current_user_can( 'manage_options' ) ) ) { return; } // Get last check transient. $last_check = get_transient( 'action_scheduler_last_pastdue_actions_check' ); // If transient exists, we're within interval, so bail. if ( ! empty( $last_check ) ) { return; } // Perform the check. $this->check_pastdue_actions(); }