|
@@ 1174-1176 (lines=3) @@
|
| 1171 |
|
} elseif ( $args['date'] === 'range' ) { |
| 1172 |
|
// Return donations for a date range. |
| 1173 |
|
// Ensure the end date is later than the start date. |
| 1174 |
|
if ( $args['enddate'] < $args['startdate'] ) { |
| 1175 |
|
$error['error'] = __( 'The end date must be later than the start date.', 'give' ); |
| 1176 |
|
} |
| 1177 |
|
|
| 1178 |
|
// Ensure both the start and end date are specified |
| 1179 |
|
if ( empty( $args['startdate'] ) || empty( $args['enddate'] ) ) { |
|
@@ 1179-1181 (lines=3) @@
|
| 1176 |
|
} |
| 1177 |
|
|
| 1178 |
|
// Ensure both the start and end date are specified |
| 1179 |
|
if ( empty( $args['startdate'] ) || empty( $args['enddate'] ) ) { |
| 1180 |
|
$error['error'] = __( 'Invalid or no date range specified.', 'give' ); |
| 1181 |
|
} |
| 1182 |
|
|
| 1183 |
|
$total = 0; |
| 1184 |
|
|
|
@@ 1305-1307 (lines=3) @@
|
| 1302 |
|
} elseif ( $args['date'] === 'range' ) { |
| 1303 |
|
// Return sales for a date range |
| 1304 |
|
// Ensure the end date is later than the start date |
| 1305 |
|
if ( $args['enddate'] < $args['startdate'] ) { |
| 1306 |
|
$error['error'] = __( 'The end date must be later than the start date.', 'give' ); |
| 1307 |
|
} |
| 1308 |
|
|
| 1309 |
|
// Ensure both the start and end date are specified |
| 1310 |
|
if ( empty( $args['startdate'] ) || empty( $args['enddate'] ) ) { |
|
@@ 1310-1312 (lines=3) @@
|
| 1307 |
|
} |
| 1308 |
|
|
| 1309 |
|
// Ensure both the start and end date are specified |
| 1310 |
|
if ( empty( $args['startdate'] ) || empty( $args['enddate'] ) ) { |
| 1311 |
|
$error['error'] = __( 'Invalid or no date range specified.', 'give' ); |
| 1312 |
|
} |
| 1313 |
|
|
| 1314 |
|
$total = (float) 0.00; |
| 1315 |
|
|