| if(typeof bts().staff == 'undefined' || typeof bts().client == 'undefined' || bts().earnings_rate == 'undefined' ){ | if(typeof bts().staff == 'undefined' || typeof bts().client == 'undefined' || bts().earnings_rate == 'undefined' ){ | ||||
| setTimeout(do_load_time_sheet,500); | setTimeout(do_load_time_sheet,500); | ||||
| }else{ | |||||
| do_load_time_sheet(); | |||||
| } | } | ||||
| function do_load_time_sheet(){ | function do_load_time_sheet(){ |
| // Usage: `wp sync_users --mininterval=123 | // Usage: `wp sync_users --mininterval=123 | ||||
| public function sync_user_cli($args = array(), $assoc_args = array()){ | public function sync_user_cli($args = array(), $assoc_args = array()){ | ||||
| $arguments = wp_parse_args( $assoc_args, array( | $arguments = wp_parse_args( $assoc_args, array( | ||||
| 'mininterval' => 600, | |||||
| 'mininterval' => 86400, | |||||
| 'employeeonly' => false, | 'employeeonly' => false, | ||||
| 'clientsonly' => false, | 'clientsonly' => false, | ||||
| ) ); | ) ); |