diff --git a/CHANGELOG.md b/CHANGELOG.md index 53778117..8d7f8039 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [4.1.2](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.1...v4.1.2) (2023-12-13) + + +### Bug Fixes + +* Filtering the events if we're looking at a specific one for prices as well ([144762e](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/144762e9e3c9c14f7c1c0ce68dafa7feb50cb4e2)) + ### [4.1.1](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.0...v4.1.1) (2023-11-10) diff --git a/PLUGIN-CHECKSUM b/PLUGIN-CHECKSUM index 18673f18..80d69e66 100644 --- a/PLUGIN-CHECKSUM +++ b/PLUGIN-CHECKSUM @@ -1 +1 @@ -1407e9f00b0c4a8134ce1402b1da499e +cdd0ea0b06aff3d7785588cc028f49ea diff --git a/content/template/detailTemplate/blocks/event-list.php b/content/template/detailTemplate/blocks/event-list.php index b9119ff9..ce97331b 100644 --- a/content/template/detailTemplate/blocks/event-list.php +++ b/content/template/detailTemplate/blocks/event-list.php @@ -59,7 +59,7 @@ if ( ! empty( $prices ) ) { foreach ( $events as $ev ) { if ( ! empty( $_GET['eid'] ) ) { // Input var okay. - if ( $ev['EventId'] !== $_GET['eid'] ) { // Input var okay. + if ( $ev['EventId'] != $_GET['eid'] ) { // Input var okay. continue; } } diff --git a/content/template/detailTemplate/course-info.php b/content/template/detailTemplate/course-info.php index 12bc116b..f783795e 100644 --- a/content/template/detailTemplate/course-info.php +++ b/content/template/detailTemplate/course-info.php @@ -36,6 +36,11 @@ $events = array(); foreach ( $selected_course['Events'] as $event ) { + if ( ! empty( $_GET['eid'] ) ) { // Input var okay. + if ( $event['EventId'] != $_GET['eid'] ) { // Input var okay. + continue; + } + } $event['CourseTemplate'] = $selected_course; unset( $event['CourseTemplate']['Events'] ); diff --git a/eduadmin.php b/eduadmin.php index 654391e1..2fe1f103 100644 --- a/eduadmin.php +++ b/eduadmin.php @@ -9,7 +9,7 @@ * Plugin URI: https://www.eduadmin.se * Description: EduAdmin plugin to allow visitors to book courses at your website * Tags: booking, participants, courses, events, eduadmin, lega online - * Version: 4.1.1 + * Version: 4.1.2 * GitHub Plugin URI: multinetinteractive/eduadmin-wordpress * GitHub Plugin URI: https://github.com/multinetinteractive/eduadmin-wordpress * Requires at least: 5.8 diff --git a/includes/edu-ajax-functions.php b/includes/edu-ajax-functions.php index a47f0680..1f35b8e9 100644 --- a/includes/edu-ajax-functions.php +++ b/includes/edu-ajax-functions.php @@ -158,7 +158,7 @@ function edu_api_listview_eventlist() { $order = array(); $custom_order = explode( ' ', $custom_order_by_order ); foreach ( $custom_order as $coVal ) { - ! isset( $coVal ) || $coVal === "asc" ? array_push( $order, 1 ) : array_push( $order, -1 ); + ! isset( $coVal ) || $coVal === "asc" ? array_push( $order, 1 ) : array_push( $order, - 1 ); } } } else { @@ -351,7 +351,7 @@ function edu_api_listview_eventlist_template_A( $data, $request ) { } include EDUADMIN_PLUGIN_PATH . '/content/template/listTemplate/blocks/event-block-a.php'; - $current_events++; + $current_events ++; } } @@ -429,7 +429,7 @@ function edu_api_listview_eventlist_template_B( $data, $request ) { } include EDUADMIN_PLUGIN_PATH . '/content/template/listTemplate/blocks/event-block-b.php'; - $current_events++; + $current_events ++; } } @@ -482,6 +482,11 @@ function edu_api_eventlist() { $events = array(); foreach ( $selected_course['Events'] as $event ) { + if ( ! empty( $_POST['eid'] ) ) { // Input var okay. + if ( $event['EventId'] != $_POST['eid'] ) { // Input var okay. + continue; + } + } $event['CourseTemplate'] = $selected_course; unset( $event['CourseTemplate']['Events'] ); @@ -556,7 +561,7 @@ function edu_api_eventlist() { $order = array(); $custom_order = explode( ' ', $custom_order_by_order ); foreach ( $custom_order as $coVal ) { - ! isset( $coVal ) || $coVal === "asc" ? array_push( $order, 1 ) : array_push( $order, -1 ); + ! isset( $coVal ) || $coVal === "asc" ? array_push( $order, 1 ) : array_push( $order, - 1 ); } } } else { @@ -574,7 +579,7 @@ function edu_api_eventlist() { $last_city = ''; - $show_more = ! empty( $_POST['showmore'] ) ? $_POST['showmore'] : -1; + $show_more = ! empty( $_POST['showmore'] ) ? $_POST['showmore'] : - 1; $spot_left_option = $_POST['spotsleft']; $always_few_spots = $_POST['fewspots']; $show_event_venue = $_POST['showvenue']; @@ -590,7 +595,7 @@ function edu_api_eventlist() { if ( ! empty( $prices ) ) { foreach ( $events as $ev ) { if ( isset( $_POST['eid'] ) ) { - if ( $ev['EventId'] !== intval( $_POST['eid'] ) ) { + if ( $ev['EventId'] != intval( $_POST['eid'] ) ) { continue; } } @@ -611,7 +616,7 @@ function edu_api_eventlist() { include EDUADMIN_PLUGIN_PATH . '/content/template/detailTemplate/blocks/event-item.php'; $last_city = $ev['City']; - $i++; + $i ++; } } if ( empty( $prices ) || empty( $events ) ) { diff --git a/package.json b/package.json index 009314f4..96530eab 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "eduadmin-wordpress-plugin", "private": true, - "version": "4.1.1", + "version": "4.1.2", "repository": "https://github.com/MultinetInteractive/EduAdmin-WordPress.git", "author": "Chris GĂ„rdenberg ", "license": "MIT", diff --git a/readme.md b/readme.md index 7ab0cb78..11e76780 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ # EduAdmin Booking - Requires at least: 5.8 - Tested up to: 6.4 -- Stable tag: 4.1.1 +- Stable tag: 4.1.2 - Requires PHP: 7.0 - License: GPL3 - License URI: https://www.gnu.org/licenses/gpl-3.0.en.html @@ -40,6 +40,13 @@ If you notice that your API key doesn't work any more, you have to contact us. The full changelog available on [GitHub](https://github.com/MultinetInteractive/EduAdmin-WordPress/blob/production/CHANGELOG.md) +### [4.1.2](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.1...v4.1.2) (2023-12-13) + + +#### Bug Fixes + +* Filtering the events if we're looking at a specific one for prices as well ([144762e](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/144762e9e3c9c14f7c1c0ce68dafa7feb50cb4e2)) + ### [4.1.1](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.0...v4.1.1) (2023-11-10) @@ -73,12 +80,5 @@ were not working in the correct way. * **Programme/Shortcodes:** Fixed an issue with Programme pages ([461c3bf](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/461c3bfac424d8614580ac4f7df2fe5d70161499)) -### [3.11.1](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v3.11.0...v3.11.1) (2023-10-09) - - -#### Bug Fixes - -* **Programme:** Added check for StatusId, so that we only show programme starts with statusid 1 (Booked) ([cc9a797](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/cc9a7970fb7aaa989facd0aea7894edeaeb9407b)) - diff --git a/readme.txt b/readme.txt index 8d9aac04..a9687033 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: mnchga Tags: booking, participants, courses, events, eduadmin, lega online Requires at least: 5.8 Tested up to: 6.4 -Stable tag: 4.1.1 +Stable tag: 4.1.2 Requires PHP: 7.0 License: GPL3 License URI: https://www.gnu.org/licenses/gpl-3.0.en.html @@ -45,6 +45,13 @@ If you notice that your API key doesn't work any more, you have to contact us. The full changelog available on [GitHub](https://github.com/MultinetInteractive/EduAdmin-WordPress/blob/production/CHANGELOG.md) +### [4.1.2](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.1...v4.1.2) (2023-12-13) + + +#### Bug Fixes + +* Filtering the events if we're looking at a specific one for prices as well ([144762e](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/144762e9e3c9c14f7c1c0ce68dafa7feb50cb4e2)) + ### [4.1.1](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.0...v4.1.1) (2023-11-10) @@ -78,12 +85,5 @@ were not working in the correct way. * **Programme/Shortcodes:** Fixed an issue with Programme pages ([461c3bf](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/461c3bfac424d8614580ac4f7df2fe5d70161499)) -### [3.11.1](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v3.11.0...v3.11.1) (2023-10-09) - - -#### Bug Fixes - -* **Programme:** Added check for StatusId, so that we only show programme starts with statusid 1 (Booked) ([cc9a797](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/cc9a7970fb7aaa989facd0aea7894edeaeb9407b)) -