pmpro_reports_signups_sql

Filter query to get cancellation numbers in signups vs cancellations detailed report.

Description

apply_filters( 'pmpro_reports_signups_sql', (string) $sqlquery, (string) $type, (string) $startdate, (string) $enddate, (int) $l ); 

Parameters (5)

0. $sqlquery (string)
The current SQL
1. $type (string)
Report type
2. $startdate (string)
Start Date in YYYY-MM-DD format
3. $enddate (string)
End Date in YYYY-MM-DD format
4. $l (int)
Level ID

Usage

To run the hook, copy the example below.
  1. $sqlquery = apply_filters( 'pmpro_reports_signups_sql', $sqlquery, $type, $startdate, $enddate, $l ); 
  2.  
  3. if ( !empty( $sqlquery ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the pmpro_reports_signups_sql callback 
  2. function filter_pmpro_reports_signups_sql( $sqlquery, $type, $startdate, $enddate, $l ) { 
  3. // make filter magic happen here... 
  4. return $sqlquery
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'pmpro_reports_signups_sql', 'filter_pmpro_reports_signups_sql', 10, 5 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'pmpro_reports_signups_sql', 'filter_pmpro_reports_signups_sql', 10, 5 ); 

Defined (1)

The filter is defined in the following location(s).

/adminpages/reports/memberships.php  
  1. $sqlQuery = apply_filters('pmpro_reports_signups_sql', $sqlQuery, $type, $startdate, $enddate, $l);