Skip to content

Commit 8b44a50

Browse files
authored
Merge pull request #2900 from gocodebox/dev
Release 8.0.3
2 parents f3d2126 + a232513 commit 8b44a50

File tree

38 files changed

+1089
-1938
lines changed

38 files changed

+1089
-1938
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ assets/css/builder.css
2020
assets/css/builder.min.css
2121
assets/css/builder-rtl.css
2222
assets/css/builder-rtl.min.css
23+
assets/css/bricks-editor-rtl.css
2324
assets/css/admin-importer*
2425
assets/css/editor*
2526
assets/css/certificates*

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,38 @@
11
LifterLMS Changelog
22
===================
33

4+
v8.0.3 - 2025-04-07
5+
-------------------
6+
7+
##### New Features
8+
9+
+ Initial support for the Bricks theme.
10+
+ New "# of transactions" sales reporting widget.
11+
12+
##### Updates and Enhancements
13+
14+
+ Change default date display format of lifterlms_course_info used in settings like Enrollment Start and End Date to match the site date format. [#2903](https://github.com/gocodebox/lifterlms/issues/2903)
15+
+ Display date pickers in the site date format, but save the data in the previous format. [#2447](https://github.com/gocodebox/lifterlms/issues/2447)
16+
+ Update Last Activity Date label to accurately reflect the data value. [#2898](https://github.com/gocodebox/lifterlms/issues/2898)
17+
18+
##### Bug Fixes
19+
20+
+ Updating postal code (eircode) display for Ireland. [#2891](https://github.com/gocodebox/lifterlms/issues/2891)
21+
+ Net Sales reporting includes partially refunded transactions, and transactions from orders regardless of status. [#2860](https://github.com/gocodebox/lifterlms/issues/2860), [#2861](https://github.com/gocodebox/lifterlms/issues/2861)
22+
+ On-hold, pending cancellation, cancelled and expired orders now included in "# of Sales" widget. [#2860](https://github.com/gocodebox/lifterlms/issues/2860)
23+
+ Fixes sales reporting for transactions or orders that happened between 23:23:59 and midnight. [#2858](https://github.com/gocodebox/lifterlms/issues/2858)
24+
+ Password reset email is now in the user's language. [#2879](https://github.com/gocodebox/lifterlms/issues/2879)
25+
26+
##### Developer Notes
27+
28+
+ Adds a new action so Turnstile or other captchas can be added without editing the free-enroll-form.php template directly.
29+
30+
##### Updated Templates
31+
32+
+ [templates/admin/reporting/tabs/students/courses-course.php](https://github.com/gocodebox/lifterlms/blob/8.0.3/templates/admin/reporting/tabs/students/courses-course.php)
33+
+ [templates/product/free-enroll-form.php](https://github.com/gocodebox/lifterlms/blob/8.0.3/templates/product/free-enroll-form.php)
34+
35+
436
v8.0.2 - 2025-03-17
537
-------------------
638

assets/css/bricks-editor.css

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/llms-analytics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
height: '75%',
149149
width: '85%',
150150
},
151-
colors: ['#606C38','#E85D75','#EF8354','#C64191','#731963'],
151+
colors: ['#606C38','#E85D75','#EF8354','#C64191','#731963','#2B6CB0','#E1B530','#319795'],
152152
height: 560,
153153
lineWidth: 4,
154154
seriesType: 'bars',

assets/js/llms-analytics.min.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

assets/js/private/llms-metaboxes.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,25 @@
269269
*/
270270
this.bind_datepicker = function( $el ) {
271271
var format = $el.attr( 'data-format' ) || 'mm/dd/yy',
272+
altFormat = $el.attr( 'data-alt-format' ) || '',
273+
altField = $el.attr( 'data-alt-field' ) || '',
272274
maxDate = $el.attr( 'data-max-date' ) || null,
273275
minDate = $el.attr( 'data-min-date' ) || null;
274276
$el.datepicker( {
275277
dateFormat: format,
276278
maxDate: maxDate,
277279
minDate: minDate,
280+
altField: altField,
281+
altFormat: altFormat
282+
} ).on( "keyup", function() {
283+
var date;
284+
try {
285+
date = $.datepicker.parseDate( $.datepicker._defaults.dateFormat, this.value );
286+
} catch ( e ) { }
287+
288+
if ( !date && altField ) {
289+
$( $.escapeSelector( altField ) ).val( "" );
290+
}
278291
} );
279292
}
280293

class-lifterlms.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ final class LifterLMS {
3434
*
3535
* @var string
3636
*/
37-
public $version = '8.0.2';
37+
public $version = '8.0.3';
3838

3939
/**
4040
* LLMS_Assets instance
@@ -336,6 +336,7 @@ public function init() {
336336
( new LLMS_Media_Protector() )->register_callbacks();
337337

338338
include_once 'includes/class-llms-elementor-migrate.php';
339+
include_once 'includes/class-llms-bricks.php';
339340
include_once 'includes/class-llms-beaver-builder.php';
340341
include_once 'includes/class-llms-beaver-builder-migrate.php';
341342

includes/abstracts/abstract.llms.analytics.widget.php

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,18 @@ protected function get_posted_dates() {
116116

117117
$dates = llms_filter_input_sanitize_string( INPUT_POST, 'dates', array( FILTER_REQUIRE_ARRAY ) );
118118
return $dates ? $dates : '';
119-
120119
}
121120

122121
protected function get_posted_courses() {
123122

124123
$courses = llms_filter_input( INPUT_POST, 'courses', FILTER_SANITIZE_NUMBER_INT, FILTER_REQUIRE_ARRAY );
125124
return $courses ? $courses : array();
126-
127125
}
128126

129127
protected function get_posted_memberships() {
130128

131129
$memberships = llms_filter_input( INPUT_POST, 'memberships', FILTER_SANITIZE_NUMBER_INT, FILTER_REQUIRE_ARRAY );
132130
return $memberships ? $memberships : array();
133-
134131
}
135132

136133
protected function get_posted_posts() {
@@ -140,7 +137,6 @@ protected function get_posted_posts() {
140137
protected function get_posted_students() {
141138
$students = llms_filter_input( INPUT_POST, 'students', FILTER_SANITIZE_NUMBER_INT, FILTER_REQUIRE_ARRAY );
142139
return $students ? $students : array();
143-
144140
}
145141

146142
protected function get_prepared_query() {
@@ -169,20 +165,26 @@ protected function format_date( $date, $type ) {
169165
break;
170166

171167
case 'end':
172-
$date .= ' 23:23:59';
168+
/**
169+
* Return 00:00:00 on the next day after this date, using PHP datetime functions to avoid issues with daylight savings time or leap years.
170+
*
171+
* 23:59:59 is not a safe way to capture the end of day in newer versions of MySQL, if the transaction happened at (say) 23:59:59.999.
172+
*/
173+
$end_date = new DateTime( $date );
174+
$end_date->modify( '+1 day' );
175+
176+
$date = $end_date->format( 'Y-m-d' ) . ' 00:00:00';
173177

174178
break;
175179

176180
}
177181

178182
return $date;
179-
180183
}
181184

182185
protected function is_error() {
183186

184187
return ( $this->success ) ? false : true;
185-
186188
}
187189

188190
protected function set_order_data_query( $args = array() ) {
@@ -235,7 +237,7 @@ protected function set_order_data_query( $args = array() ) {
235237
$order_dates = '';
236238
if ( $date_range ) {
237239
$dates = $this->get_posted_dates();
238-
$order_dates = "AND orders.{$date_field} BETWEEN CAST( %s AS DATETIME ) AND CAST( %s AS DATETIME )";
240+
$order_dates = "AND orders.{$date_field} >= CAST( %s as DATETIME ) AND orders.{$date_field} < CAST( %s as DATETIME )";
239241
$this->query_vars[] = $this->format_date( $dates['start'], 'start' );
240242
$this->query_vars[] = $this->format_date( $dates['end'], 'end' );
241243
}
@@ -291,7 +293,6 @@ protected function set_order_data_query( $args = array() ) {
291293
{$wheres_clause}
292294
{$order_clause}
293295
;";
294-
295296
}
296297

297298
/**
@@ -333,7 +334,6 @@ protected function query() {
333334
$this->message = $wpdb->last_error;
334335

335336
}
336-
337337
}
338338

339339
/**
@@ -384,7 +384,6 @@ public function can_be_processed() {
384384
$widget_name,
385385
$this
386386
);
387-
388387
}
389388

390389
/**
@@ -409,8 +408,5 @@ public function output() {
409408
header( 'Content-Type: application/json' );
410409
echo wp_json_encode( $this );
411410
wp_die();
412-
413411
}
414-
415-
416412
}

0 commit comments

Comments
 (0)