PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | inc/order/class-lp-order.php +3 -3 4.4.74.4.8 View file →
@@ -1516,9 +1516,9 @@
1516 1516 $month = $param['m'] ?? '';
1517 1517 $limit = $param['posts_per_page'] ?? 20;
1518 1518 $paged = $param['paged'] ?? 1;
1519 1519 $refund_request_status = sanitize_key( (string) ( $param['refund_request_status'] ?? '' ) );
1520 - $order_by = $param['orderby'] ?? 'date';
1520 + $order_by = $param['orderby'] ?? 'menu_order';
1521 1521 if ( empty( $order_by ) ) {
1522 1522 $order_by = 'ID';
1523 1523 } else {
1524 1524 switch ( $order_by ) {
@@ -1531,8 +1531,9 @@
1531 1531 'post_title',
1532 1532 'post_author',
1533 1533 'post_status',
1534 1534 'order_total',
1535 + 'menu_order'
1535 1536 );
1536 1537 if ( ! in_array( $order_by, $allowed_key ) ) {
1537 1538 $order_by = 'ID';
1538 1539 }
@@ -1544,10 +1545,9 @@
1544 1545 // End convert params
1545 1546
1546 1547 if ( $order_by === 'order_total' ) {
1547 1548 $post_filter->join[] = "INNER JOIN {$post_db->tb_postmeta} pm2 ON p.ID = pm2.post_id AND pm2.meta_key = '_order_total'";
1548 - $post_filter->where[] = 'AND CAST(pm2.meta_value AS UNSIGNED)';
1549 - $post_filter->order_by = 'pm2.meta_value';
1549 + $post_filter->order_by = 'CAST(pm2.meta_value AS DECIMAL(10,2))';
1550 1550 } else {
1551 1551 $post_filter->order_by = $order_by;
1552 1552 }
1553 1553