src/Plugin.php
/**
     * Setting up the crons if needed
     */
Setting up the crons if needed
Setting up the crons if needed
private function crons()
    {
        add_filter('cron_schedules', '\Moloni\Crons::addCronInterval');
        add_action('moloniProductsSync', '\Moloni\Crons::productsSync');
        if (!wp_next_scheduled('moloniProductsSync')) {
            wp_schedule_event(time(), 'everyficeminutes', 'moloniProductsSync');
        }
    }
private function crons ( ) { add_filter ( 'cron_schedules' , '\Moloni\Crons::addCronInterval' ) ; add_action ( 'moloniProductsSync' , '\Moloni\Crons::productsSync' ) ; if ( ! wp_next_scheduled ( 'moloniProductsSync' ) ) { wp_schedule_event ( time ( ) , 'everyficeminutes' , 'moloniProductsSync' ) ; } }
Setting up the crons if needed
Setting up the crons if needed