Automattic\WooCommerce\Internal\Admin
SystemStatusReport::render_daily_cron
Render daily cron row.
Method of the class: SystemStatusReport{}
No Hooks.
Returns
null. Nothing (null).
Usage
$SystemStatusReport = new SystemStatusReport(); $SystemStatusReport->render_daily_cron();
SystemStatusReport::render_daily_cron() SystemStatusReport::render daily cron code WC 10.8.1
<?php
public function render_daily_cron() {
$next_daily_cron = wp_next_scheduled( 'wc_admin_daily' );
?>
<tr>
<td data-export-label="Daily Cron">
<?php esc_html_e( 'Daily Cron', 'woocommerce' ); ?>:
</td>
<td class="help"><?php echo wc_help_tip( esc_html__( 'Is the daily cron job active, when does it next run?', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
<td>
<?php
if ( empty( $next_daily_cron ) ) {
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Not scheduled', 'woocommerce' ) . '</mark>';
} else {
echo '<mark class="yes"><span class="dashicons dashicons-yes"></span> Next scheduled: ' . esc_html( date_i18n( 'Y-m-d H:i:s P', $next_daily_cron ) ) . '</mark>';
}
?>
</td>
</tr>
<?php
}