public function modelAction( $actionData = false )
{
-
+ $rolesReset = 0;
// echo '<pre>$actionData: ' . print_r( $actionData, true ) . '</pre>';
$days_after_expired = $this->config['settings']['days_after_expired'];
$current_date = date( 'Y-m-d' );
ARRAY_A
);
$total = count( $members );
- echo '<pre>$total: ' . print_r( $total, true ) . '</pre>';
+ // echo '<pre>$total: ' . print_r( $total, true ) . '</pre>';
if ( isset( $members ) && $members ) {
foreach ( $members as $member ) {
echo '<pre>$member: ' . print_r( $member, true ) . '</pre>';
$user_id = $Contact->getWpUserId( $contact_id );
$wpUser = get_user_by( 'id', $user_id );
if ( $wpUser ) {
- echo '<pre>$wpUser-role: ' . print_r( $wpUser->roles, true ) . '</pre>';
+ // echo '<pre>$wpUser-role: ' . print_r( $wpUser->roles, true ) . '</pre>';
$roles = $wpUser->roles;
if ( $roles[0] != 'glm_members_own_entity_manager' ) {
+ $rolesReset++;
apply_filters(
'glm_contact_update_user_role_by_ref_dest',
'',
}
}
+ echo '<pre>$rolesReset: ' . print_r( $rolesReset, true ) . '</pre>';
}
}
array(
'menu' => 'ajax',
'action' => 'billingFlagExpiredUsers',
- 'daysOfWeek' => range( 1, 7 ),
+ 'daysOfWeek' => false,
'times' => array( 5 ),
'params' => array()
)
}
);
+add_filter(
+ 'glm_associate_cron_request',
+ function( $cron_task ){
+ $new_cron = array(
+ array(
+ 'menu' => 'ajax',
+ 'action' => 'billingFixActiveUsers',
+ 'daysOfWeek' => false,
+ 'times' => array( 6 ),
+ 'params' => array()
+ )
+ );
+ return array_merge( $cron_task, $new_cron );
+ }
+);
+
/**
* Setup cron task request to run billingSetupQueue
*
array(
'menu' => 'ajax',
'action' => 'billingSetupQueue',
- 'daysOfWeek' => range( 1, 7 ),
+ 'daysOfWeek' => false,
'times' => array( 3 ),
'params' => array()
)
array(
'menu' => 'ajax',
'action' => 'billingRunQueue',
- 'daysOfWeek' => range( 1, 7 ),
+ 'daysOfWeek' => false,
'times' => array( 4 ),
'params' => array()
)