diff --git a/CHANGELOG.md b/CHANGELOG.md index edd33432..3da196e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,23 @@ 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. +## [5.4.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v5.3.1...v5.4.0) (2025-02-25) + + +### Features + +* Added VoucherTemplate OData-endpoint ([9a6c631](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/9a6c6310fb4876ab4e1413e83d17491ffc018d6a)) + + +### Bug Fixes + +* Custom course detail views will no longer require an attribute to show on demand events. ([6f90e87](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/6f90e875845d78a44ab32dda817284ad8b8b82ca)) + + +### Documentation + +* Remove ondemand-attribute from detailinfo ([dfa3f59](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/dfa3f59c5bea11c8da99d5067e415d6859475a34)) + ### [5.3.1](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v5.3.0...v5.3.1) (2024-11-05) diff --git a/PLUGIN-CHECKSUM b/PLUGIN-CHECKSUM index 0198b235..d7a03d48 100644 --- a/PLUGIN-CHECKSUM +++ b/PLUGIN-CHECKSUM @@ -1 +1 @@ -ee9371cadec3e8823d80bf2acd425530 +ad8df46e2a1db959069163d7ffa25b3e diff --git a/eduadmin.php b/eduadmin.php index e67622c8..07d156eb 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 - * Version: 5.3.1 + * Version: 5.4.0 * GitHub Plugin URI: multinetinteractive/eduadmin-wordpress * GitHub Plugin URI: https://github.com/multinetinteractive/eduadmin-wordpress * Requires at least: 6.0 @@ -23,7 +23,7 @@ */ /* EduAdmin Booking plugin - Copyright (C) 2015-2024 Chris Gårdenberg, MultiNet Interactive AB + Copyright (C) 2015-2025 Chris Gårdenberg, MultiNet Interactive AB This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/includes/edu-shortcodes.php b/includes/edu-shortcodes.php index 238d7dd4..353e6682 100644 --- a/includes/edu-shortcodes.php +++ b/includes/edu-shortcodes.php @@ -420,7 +420,6 @@ function eduadmin_get_detailinfo( $attributes ) { 'courseinquiryurl' => null, 'order' => null, 'orderby' => null, - 'ondemand' => false, 'allcourses' => false, ), normalize_empty_atts( $attributes ), @@ -464,18 +463,18 @@ function eduadmin_get_detailinfo( $attributes ) { $fetch_months = 6; } - if ( ! $attributes['ondemand'] ) { - $edo = EDUAPIHelper()->GetCourseDetailInfo( $course_id, $fetch_months, $group_by_city ); - } else { - $edo = EDUAPIHelper()->GetOnDemandCourseDetailInfo( $course_id, $group_by_city ); - } - - $selected_course = false; + $edo = EDUAPIHelper()->GetCourseDetailInfo( $course_id, $fetch_months, $group_by_city ); if ( ! empty( $edo ) ) { $selected_course = json_decode( $edo, true ); } + $is_ondemand = $selected_course['OnDemand']; + + if ( $is_ondemand ) { + $selected_course = json_decode( EDUAPIHelper()->GetOnDemandCourseDetailInfo( $course_id, $group_by_city ), true ); + } + if ( ! is_array( $selected_course ) ) { EDU()->stop_timer( $t ); @@ -742,7 +741,7 @@ function eduadmin_get_detailinfo( $attributes ) { $ret_str .= ' data-orderby="' . esc_attr( $custom_order_by_order ) . '"'; $ret_str .= ' data-showvenue="' . esc_attr( EDU()->is_checked( 'eduadmin-showEventVenueName', false ) ) . '"'; $ret_str .= ' data-eventinquiry="' . esc_attr( EDU()->is_checked( 'eduadmin-allowInterestRegEvent', false ) ) . '"'; - $ret_str .= ' data-ondemand="' . esc_attr( $attributes['ondemand'] ) . '"'; + $ret_str .= ' data-ondemand="' . esc_attr( $is_ondemand ) . '"'; $ret_str .= ' data-allcourses="' . esc_attr( $attributes['allcourses'] ) . '"'; $ret_str .= '>'; diff --git a/includes/eduadmin-api-phpclient b/includes/eduadmin-api-phpclient index d58f16ce..c8793e7e 160000 --- a/includes/eduadmin-api-phpclient +++ b/includes/eduadmin-api-phpclient @@ -1 +1 @@ -Subproject commit d58f16ce1610d7016b5a6cf98de0a6c3f210a2f8 +Subproject commit c8793e7e276e02aa9f1a2f96965360db6d9f2ae7 diff --git a/new_website/docs/shortcodes.md b/new_website/docs/shortcodes.md index eee78758..d7c18651 100644 --- a/new_website/docs/shortcodes.md +++ b/new_website/docs/shortcodes.md @@ -120,7 +120,6 @@ This shortcode is used when you want to create your own custom template [**detai | courseinquiryurl | boolean | null | | order | string (`ASC`, `DESC`) | _null_ | | orderby | string | _null_ | -| ondemand | boolean | false | We will go into each attribute on the [_custom template_](custom-template.md) page. diff --git a/package.json b/package.json index d06f8a9f..9d0d4aab 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "eduadmin-wordpress-plugin", "private": true, - "version": "5.3.1", + "version": "5.4.0", "repository": "https://github.com/MultinetInteractive/EduAdmin-WordPress.git", "author": "Chris Gårdenberg ", "license": "MIT", diff --git a/readme.md b/readme.md index 803e9e24..fca51b8e 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ # EduAdmin Booking - Requires at least: 6.0 - Tested up to: 6.6 -- Stable tag: 5.3.1 +- Stable tag: 5.4.0 - Requires PHP: 8.1 - License: GPL3 - License URI: https://www.gnu.org/licenses/gpl-3.0.en.html @@ -44,6 +44,23 @@ 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) +### [5.4.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v5.3.1...v5.4.0) (2025-02-25) + + +#### Features + +* Added VoucherTemplate OData-endpoint ([9a6c631](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/9a6c6310fb4876ab4e1413e83d17491ffc018d6a)) + + +#### Bug Fixes + +* Custom course detail views will no longer require an attribute to show on demand events. ([6f90e87](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/6f90e875845d78a44ab32dda817284ad8b8b82ca)) + + +#### Documentation + +* Remove ondemand-attribute from detailinfo ([dfa3f59](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/dfa3f59c5bea11c8da99d5067e415d6859475a34)) + ### [5.3.1](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v5.3.0...v5.3.1) (2024-11-05) @@ -70,7 +87,5 @@ The full changelog available on [GitHub](https://github.com/MultinetInteractive/ * Added repeatFrequency, repeatCount and courseMode for LD+JSON ([e5e5c42](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/e5e5c42bfe37d39c088e6901c2de3e7f31841e75)), closes [#511](https://github.com/MultinetInteractive/EduAdmin-WordPress/issues/511) -### [5.1.3](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v5.1.2...v5.1.3) (2024-10-10) - diff --git a/readme.txt b/readme.txt index 9de267cb..8849c1e4 100644 --- a/readme.txt +++ b/readme.txt @@ -1,9 +1,9 @@ === EduAdmin Booking === Contributors: mnchga -Tags: booking, participants, courses, events, eduadmin, lega online +Tags: booking, participants, courses, events, eduadmin Requires at least: 6.0 Tested up to: 6.6 -Stable tag: 5.3.1 +Stable tag: 5.4.0 Requires PHP: 8.1 License: GPL3 License URI: https://www.gnu.org/licenses/gpl-3.0.en.html @@ -49,6 +49,23 @@ 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) +### [5.4.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v5.3.1...v5.4.0) (2025-02-25) + + +#### Features + +* Added VoucherTemplate OData-endpoint ([9a6c631](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/9a6c6310fb4876ab4e1413e83d17491ffc018d6a)) + + +#### Bug Fixes + +* Custom course detail views will no longer require an attribute to show on demand events. ([6f90e87](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/6f90e875845d78a44ab32dda817284ad8b8b82ca)) + + +#### Documentation + +* Remove ondemand-attribute from detailinfo ([dfa3f59](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/dfa3f59c5bea11c8da99d5067e415d6859475a34)) + ### [5.3.1](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v5.3.0...v5.3.1) (2024-11-05) @@ -75,7 +92,5 @@ The full changelog available on [GitHub](https://github.com/MultinetInteractive/ * Added repeatFrequency, repeatCount and courseMode for LD+JSON ([e5e5c42](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/e5e5c42bfe37d39c088e6901c2de3e7f31841e75)), closes [#511](https://github.com/MultinetInteractive/EduAdmin-WordPress/issues/511) -### [5.1.3](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v5.1.2...v5.1.3) (2024-10-10) - diff --git a/src/readme.txt b/src/readme.txt index 150651e6..76fcee6a 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -1,6 +1,6 @@ === EduAdmin Booking === Contributors: mnchga -Tags: booking, participants, courses, events, eduadmin, lega online +Tags: booking, participants, courses, events, eduadmin Requires at least: $PLUGINATLEAST$ Tested up to: $PLUGINTESTEDTO$ Stable tag: $PLUGINVERSION$