From: Steve Sutton Date: Tue, 1 May 2018 14:40:49 +0000 (-0400) Subject: Update to start cron task up X-Git-Tag: v1.0.0^2~24 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=bca20e4e4f9c4260c210fa1b77d327d4ebd680cd;p=WP-Plugins%2Fglm-member-db-billing.git Update to start cron task up uncomment cron task. --- diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 5d8f3c9..f5917a4 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -25,75 +25,75 @@ * * Also note that parameters will be in the context of the main admin controller constructor. */ -// add_filter( -// 'glm-member-db-dashboard-member-widgets', -// function( $member = null ){ -// return $this->controller( 'dashboard', 'billing', $member ); -// }, -// 9, -// 1 -// ); +add_filter( + 'glm-member-db-dashboard-member-widgets', + function( $member = null ){ + return $this->controller( 'dashboard', 'billing', $member ); + }, + 9, + 1 +); /** * Setup cron task request to run billingFlagExpiredUsers * * Run only once per day. Everyday. */ -// add_filter( -// 'glm_associate_cron_request', -// function( $cron_task ){ -// $new_cron = array( -// array( -// 'menu' => 'ajax', -// 'action' => 'billingFlagExpiredUsers', -// 'daysOfWeek' => range( 1, 7 ), -// // 'times' => array( 5 ), -// 'times' => range( 0, 23 ), -// 'params' => array() -// ) -// ); -// return array_merge( $cron_task, $new_cron ); -// } -// ); +add_filter( + 'glm_associate_cron_request', + function( $cron_task ){ + $new_cron = array( + array( + 'menu' => 'ajax', + 'action' => 'billingFlagExpiredUsers', + 'daysOfWeek' => range( 1, 7 ), + // 'times' => array( 5 ), + 'times' => range( 0, 23 ), + 'params' => array() + ) + ); + return array_merge( $cron_task, $new_cron ); + } +); /** * Setup cron task request to run billingSetupQueue * * Run only once per day. Everyday. */ -// add_filter( -// 'glm_associate_cron_request', -// function( $cron_task ) { -// $new_cron = array( -// array( -// 'menu' => 'ajax', -// 'action' => 'billingSetupQueue', -// 'daysOfWeek' => range( 1, 7 ), -// 'times' => array( 3 ), -// 'params' => array() -// ) -// ); -// return array_merge( $cron_task, $new_cron ); -// } -// ); +add_filter( + 'glm_associate_cron_request', + function( $cron_task ) { + $new_cron = array( + array( + 'menu' => 'ajax', + 'action' => 'billingSetupQueue', + 'daysOfWeek' => range( 1, 7 ), + 'times' => array( 3 ), + 'params' => array() + ) + ); + return array_merge( $cron_task, $new_cron ); + } +); /** * Setup cron task request to run billingRunQueue * * Run only once per day. Everyday. */ -// add_filter( -// 'glm_associate_cron_request', -// function( $cron_task ) { -// $new_cron = array( -// array( -// 'menu' => 'ajax', -// 'action' => 'billingRunQueue', -// 'daysOfWeek' => range( 1, 7 ), -// 'times' => array( 4 ), -// 'params' => array() -// ) -// ); -// return array_merge( $cron_task, $new_cron ); -// } -// ); +add_filter( + 'glm_associate_cron_request', + function( $cron_task ) { + $new_cron = array( + array( + 'menu' => 'ajax', + 'action' => 'billingRunQueue', + 'daysOfWeek' => range( 1, 7 ), + 'times' => array( 4 ), + 'params' => array() + ) + ); + return array_merge( $cron_task, $new_cron ); + } +);