WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\Domain\Services

DraftOrders::maybe_create_cronjobs() protected WC 1.0

Maybe create cron events.

{} It's a method of the class: DraftOrders{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->maybe_create_cronjobs();

Code of DraftOrders::maybe_create_cronjobs() WC 5.6.0

protected function maybe_create_cronjobs() {
	if ( function_exists( 'as_next_scheduled_action' ) && false === as_next_scheduled_action( 'woocommerce_cleanup_draft_orders' ) ) {
		as_schedule_recurring_action( strtotime( 'midnight tonight' ), DAY_IN_SECONDS, 'woocommerce_cleanup_draft_orders' );
	}
}