$hook, 'group' => self::GROUP, 'status' => ActionScheduler_Store::STATUS_PENDING, 'per_page' => 1 ), 'ids' ); if ( ! empty( $ids ) ) { return true; } } return (bool) wp_next_scheduled( $hook ); } public static function queued( $hook ) { if ( function_exists( 'as_next_scheduled_action' ) && false !== as_next_scheduled_action( $hook, array(), self::GROUP ) ) { return true; } return (bool) wp_next_scheduled( $hook ); } public static function clear( $hook ) { if ( function_exists( 'as_unschedule_all_actions' ) ) { as_unschedule_all_actions( $hook, array(), self::GROUP ); } wp_clear_scheduled_hook( $hook ); } }