public function modelAction( $actionData = false )
{
- echo '<pre>$actionData: ' . print_r( $actionData, true ) . '</pre>';
+ // echo '<pre>$actionData: ' . print_r( $actionData, true ) . '</pre>';
$days_after_expired = $this->config['settings']['days_after_expired'];
$current_date = date( 'Y-m-d' );
$restrictedRole = $this->config['contact_role_numb']['LogInContact'];
- echo '<pre>$restrictedRole: ' . print_r( $restrictedRole, true ) . '</pre>';
+ // echo '<pre>$restrictedRole: ' . print_r( $restrictedRole, true ) . '</pre>';
// Update All expired accounts so they can only be in members only not admin.
// Find all member contacts (by ref_dest) with accounts that are expired.
);
if ( isset( $members ) && $members ) {
foreach ( $members as $member ) {
- echo '<pre>$member: ' . print_r( $member, true ) . '</pre>';
+ // echo '<pre>$member: ' . print_r( $member, true ) . '</pre>';
apply_filters(
'glm_contact_update_user_role_by_ref_dest',
'',
$billingSupport = new GlmBillingSupport( $this->wpdb, $this->config );
foreach ( $notifications as $notice ) {
- echo '<pre>$notice: ' . print_r( $notice, true ) . '</pre>';
+ // echo '<pre>$notice: ' . print_r( $notice, true ) . '</pre>';
switch( $notice['send_date_period'] ) {
case $this->config['send_date_when_numb']['After']:
$before = false;
break;
}
$accounts = $billingSupport->getAccountsRenewing( $notice['send_date_number'], $notice['send_date_period'], $before );
- echo '<pre>$accounts: ' . print_r( $accounts, true ) . '</pre>';
+ // echo '<pre>$accounts: ' . print_r( $accounts, true ) . '</pre>';
// return false;
if ( isset( $accounts ) && is_array( $accounts ) && !empty( $accounts ) ) {
foreach ( $accounts as $account ) {
*
* 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 ),
+ '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 );
+ }
+);