Current Path : /storage/v11800/testtest/public_html/wp-content/plugins/woo-razorpay/includes/cron/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/testtest/public_html/wp-content/plugins/woo-razorpay/includes/cron/cron.php |
<?php
add_action(Constants::ONE_CC_ADDRESS_SYNC_CRON_HOOK, Constants::ONE_CC_ADDRESS_SYNC_CRON_EXEC);
function createCron(string $hookName, int $startTime, string $recurrence)
{
if (wp_next_scheduled($hookName))
{
throw new Exception($hookName . " already exists");
}
wp_schedule_event($startTime, $recurrence, $hookName);
}
function deleteCron(string $hookName)
{
$timestamp = wp_next_scheduled( $hookName );
wp_unschedule_event( $timestamp, $hookName );
}