Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.2.0 #512

Merged
merged 3 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.2...v4.2.0) (2023-12-21)


### Features

* Support for the required fields in Google Search Console for the ld+json ([519a446](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/519a446527a37ae8ffc7e3d159ea99c5c9d86e45)), closes [#511](https://github.com/MultinetInteractive/EduAdmin-WordPress/issues/511)

### [4.1.2](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.1...v4.1.2) (2023-12-13)


Expand Down
2 changes: 1 addition & 1 deletion PLUGIN-CHECKSUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cdd0ea0b06aff3d7785588cc028f49ea
3de0d7f8f7f89943ea03086bef2fce18
48 changes: 47 additions & 1 deletion content/template/data/ld-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,29 @@
return;
}

$prices = array();

if ( ! empty( $selected_course['PriceNames'] ) ) {
foreach ( $selected_course['PriceNames'] as $pn ) {
$prices[ (string) $pn['PriceNameId'] ] = $pn;
}
}

$org_name = trim( ! empty( $organization['LegalName'] ) ? $organization['LegalName'] : $organization['OrganisationName'] );

$events = null;
$events = [];

$offers = [];

foreach ( $prices as $priceNameId => $priceName ) {
$offers[] = [
'@type' => 'Offer',
'price' => $priceName['Price'],
'category' => $priceName['Price'] == 0 ? 'Free' : 'Paid',
'priceCurrency' => EDU()->get_option( 'eduadmin-currency', 'SEK' ),
'name' => $priceName['PriceNameDescription'],
];
}

foreach ( $selected_course['Events'] as $event ) {
$_event = [
Expand All @@ -63,10 +83,35 @@
$_event['courseMode'] = "online";
$_event['location'] = "Online";
$_event['description'] = 'On-demand';

if ( $event['OnDemandAccessDays'] == null && $selected_course['OnDemandAccessDays'] != null ) {
$event['OnDemandAccessDays'] = $selected_course['OnDemandAccessDays'];
}

if ( $event['OnDemandAccessDays'] > 0 ) {
$_event['courseSchedule'] = [
'@type' => 'Schedule',
'repeatFrequency' => 'Daily',
'repeatCount' => $event['OnDemandAccessDays'],
];
} else {
$_event['courseSchedule'] = [
'@type' => 'Schedule',
'duration' => 'P1D',
'repeatFrequency' => 'Yearly',
'repeatCount' => 99,
];
}
} else {
$_event['location'] = $event['City'];
$_event['startDate'] = $event['StartDate'];
$_event['endDate'] = $event['EndDate'];

$_event['courseSchedule'] = [
'@type' => 'Schedule',
'startDate' => $event['StartDate'],
'endDate' => $event['EndDate'],
];
}

if ( ! empty( $event['MaxParticipantNumber'] ) && $event['MaxParticipantNumber'] > 0 ) {
Expand All @@ -93,6 +138,7 @@
'image' => $organization['LogoUrl'],
],
'hasCourseInstance' => $events,
'offers' => $offers,
];

echo '<script type="application/ld+json">
Expand Down
2 changes: 1 addition & 1 deletion eduadmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.2
* Version: 4.2.0
* GitHub Plugin URI: multinetinteractive/eduadmin-wordpress
* GitHub Plugin URI: https://github.com/multinetinteractive/eduadmin-wordpress
* Requires at least: 5.8
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "eduadmin-wordpress-plugin",
"private": true,
"version": "4.1.2",
"version": "4.2.0",
"repository": "https://github.com/MultinetInteractive/EduAdmin-WordPress.git",
"author": "Chris Gårdenberg <[email protected]>",
"license": "MIT",
Expand Down
23 changes: 8 additions & 15 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# EduAdmin Booking
- Requires at least: 5.8
- Tested up to: 6.4
- Stable tag: 4.1.2
- Stable tag: 4.2.0
- Requires PHP: 7.0
- License: GPL3
- License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
Expand Down Expand Up @@ -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.2.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.2...v4.2.0) (2023-12-21)


#### Features

* Support for the required fields in Google Search Console for the ld+json ([519a446](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/519a446527a37ae8ffc7e3d159ea99c5c9d86e45)), closes [#511](https://github.com/MultinetInteractive/EduAdmin-WordPress/issues/511)

### [4.1.2](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.1...v4.1.2) (2023-12-13)


Expand All @@ -66,19 +73,5 @@ The full changelog available on [GitHub](https://github.com/MultinetInteractive/

* **Shortcodes:** Added info about the new shortcode ([4fe4b80](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/4fe4b8015c095841a75cfd5348ece89bfb90944a)), closes [#506](https://github.com/MultinetInteractive/EduAdmin-WordPress/issues/506)

### [4.0.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v3.11.1...v4.0.0) (2023-10-10)


#### ⚠ BREAKING CHANGES

* **Programme/Shortcodes:** Custom code with `do_shortcode` now needs to do
`echo do_shortcode( '[eduadmin-programme-list]' );` after the change.
Which is the intended way to use `do_shortcode` the previous versions
were not working in the correct way.

#### Bug Fixes

* **Programme/Shortcodes:** Fixed an issue with Programme pages ([461c3bf](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/461c3bfac424d8614580ac4f7df2fe5d70161499))



23 changes: 8 additions & 15 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.2
Stable tag: 4.2.0
Requires PHP: 7.0
License: GPL3
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
Expand Down Expand Up @@ -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.2.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.2...v4.2.0) (2023-12-21)


#### Features

* Support for the required fields in Google Search Console for the ld+json ([519a446](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/519a446527a37ae8ffc7e3d159ea99c5c9d86e45)), closes [#511](https://github.com/MultinetInteractive/EduAdmin-WordPress/issues/511)

### [4.1.2](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.1...v4.1.2) (2023-12-13)


Expand All @@ -71,19 +78,5 @@ The full changelog available on [GitHub](https://github.com/MultinetInteractive/

* **Shortcodes:** Added info about the new shortcode ([4fe4b80](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/4fe4b8015c095841a75cfd5348ece89bfb90944a)), closes [#506](https://github.com/MultinetInteractive/EduAdmin-WordPress/issues/506)

### [4.0.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v3.11.1...v4.0.0) (2023-10-10)


#### ⚠ BREAKING CHANGES

* **Programme/Shortcodes:** Custom code with `do_shortcode` now needs to do
`echo do_shortcode( '[eduadmin-programme-list]' );` after the change.
Which is the intended way to use `do_shortcode` the previous versions
were not working in the correct way.

#### Bug Fixes

* **Programme/Shortcodes:** Fixed an issue with Programme pages ([461c3bf](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/461c3bfac424d8614580ac4f7df2fe5d70161499))