Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the multisite-clone-duplicator
domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init
action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/web/site/public_html/wp-includes/functions.php on line 6114
;
}
/**
* Check past-due actions, and print notice.
*/
protected function check_pastdue_actions() {
// Set thresholds.
$threshold_seconds = (int) apply_filters( 'action_scheduler_pastdue_actions_seconds', DAY_IN_SECONDS );
$threshold_min = (int) apply_filters( 'action_scheduler_pastdue_actions_min', 1 );
// Set fallback value for past-due actions count.
$num_pastdue_actions = 0;
// Allow third-parties to preempt the default check logic.
$check = apply_filters( 'action_scheduler_pastdue_actions_check_pre', null );
// If no third-party preempted and there are no past-due actions, return early.
if ( ! is_null( $check ) ) {
return;
}
// Scheduled actions query arguments.
$query_args = array(
'date' => as_get_datetime_object( time() - $threshold_seconds ),
'status' => ActionScheduler_Store::STATUS_PENDING,
'per_page' => $threshold_min,
);
// If no third-party preempted, run default check.
if ( is_null( $check ) ) {
$store = ActionScheduler_Store::instance();
$num_pastdue_actions = (int) $store->query_actions( $query_args, 'count' );
// Check if past-due actions count is greater than or equal to threshold.
$check = ( $num_pastdue_actions >= $threshold_min );
$check = (bool) apply_filters( 'action_scheduler_pastdue_actions_check', $check, $num_pastdue_actions, $threshold_seconds, $threshold_min );
}
// If check failed, set transient and abort.
if ( ! boolval( $check ) ) {
$interval = apply_filters( 'action_scheduler_pastdue_actions_check_interval', round( $threshold_seconds / 4 ), $threshold_seconds );
set_transient( 'action_scheduler_last_pastdue_actions_check', time(), $interval );
return;
}
$actions_url = add_query_arg(
array(
'page' => 'action-scheduler',
'status' => 'past-due',
'order' => 'asc',
),
admin_url( 'tools.php' )
);
// Print notice.
echo '
'; printf( wp_kses( // translators: 1) is the number of affected actions, 2) is a link to an admin screen. _n( 'Action Scheduler: %1$d past-due action found; something may be wrong. Read documentation »', 'Action Scheduler: %1$d past-due actions found; something may be wrong. Read documentation »', $num_pastdue_actions, 'woocommerce' ), array( 'strong' => array(), 'a' => array( 'href' => true, 'target' => true, ), ) ), absint( $num_pastdue_actions ), esc_attr( esc_url( $actions_url ) ) ); echo '
%s
', esc_html( $as_source_path ) );
if ( ! empty( $as_source ) ) {
$as_source_markup = sprintf(
'%s: %s',
ucfirst( $as_source['type'] ),
esc_attr( $as_source_path ),
esc_html( $as_source['name'] )
);
}
$screen->add_help_tab(
array(
'id' => 'action_scheduler_about',
'title' => __( 'About', 'woocommerce' ),
'content' =>
// translators: %s is the Action Scheduler version.
'' . __( 'Action Scheduler is a scalable, traceable job queue for background processing large sets of actions. Action Scheduler works by triggering an action hook to run at some time in the future. Scheduled actions can also be scheduled to run on a recurring schedule.', 'woocommerce' ) . '
' . '' . esc_html__( 'Action Scheduler is currently being loaded from the following location. This can be useful when debugging, or if requested by the support team.', 'woocommerce' ) . '
' . '' . $as_source_markup . '
' . '' .
sprintf(
/* translators: %1$s is WP CLI command (not translatable) */
esc_html__( 'WP CLI commands are available: execute %1$s for a list of available commands.', 'woocommerce' ),
'wp help action-scheduler
'
) .
'