MP_Reports::do_initnewleads( string $period )
Init new Leads.
Contents
Parameters Parameters
- $period
-
(string) (Required) days, months or years.
Source Source
File: mortgage-platform/Inc/Callback/MP_Reports.php
protected function do_initnewleads( $period ) {
$arr = array(
'column' => 'post_date',
'after' => '1 months ago',
'inclusive' => true,
);
$leads_id = $this->get_id_for_period( $arr, array( MortgagePlatform::$lead ) );
if ( ! empty( $leads_id ) ) {
$new_leads = $this->get_date( $leads_id );
$count_leads = $this->get_count( $new_leads, $period );
return wp_send_json( array_reverse( $count_leads ) );
}
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |