Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing signups not showing on the last day of memberships report #3280

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions adminpages/reports/memberships.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function pmpro_report_memberships_page() {
}

$sqlQuery .= "WHERE mu.startdate >= '" . esc_sql( $startdate ) . "' ";
$sqlQuery .= "AND mu.startdate <= '" . esc_sql( $enddate ) . "' ";
$sqlQuery .= "AND mu.startdate <= '" . esc_sql( $enddate ) . " 23:59:59' ";

if ( ! empty( $l ) ) {
$sqlQuery .= 'AND mu.membership_id IN(' . $l . ') '; // $l is already escaped for SQL. See declaration.
Expand Down Expand Up @@ -279,7 +279,8 @@ function pmpro_report_memberships_page() {
}

$sqlQuery .= "AND mu1.enddate >= '" . esc_sql( $startdate ) . "'
AND mu1.enddate < '" . esc_sql( $enddate ) . "' ";
AND mu1.enddate <= '" . $enddate . " 23:59:59' ";


// restrict by level
if ( ! empty( $l ) ) {
Expand Down