Plugin Directory

Changeset 3012782


Ignore:
Timestamp:
12/21/2023 07:37:41 AM (2 years ago)
Author:
mnchga
Message:

Committing changes for 4.2.0

Location:
eduadmin-booking/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • eduadmin-booking/trunk/CHANGELOG.md

    r3009447 r3012782  
    22
    33All 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
     5## [4.2.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.2...v4.2.0) (2023-12-21)
     6
     7
     8### Features
     9
     10* 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)
    411
    512### [4.1.2](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.1...v4.1.2) (2023-12-13)
  • eduadmin-booking/trunk/PLUGIN-CHECKSUM

    r3009447 r3012782  
    1 cdd0ea0b06aff3d7785588cc028f49ea
     13de0d7f8f7f89943ea03086bef2fce18
  • eduadmin-booking/trunk/content/template/data/ld-json.php

    r2777642 r3012782  
    5050        }
    5151
     52        $prices = array();
     53
     54        if ( ! empty( $selected_course['PriceNames'] ) ) {
     55            foreach ( $selected_course['PriceNames'] as $pn ) {
     56                $prices[ (string) $pn['PriceNameId'] ] = $pn;
     57            }
     58        }
     59
    5260        $org_name = trim( ! empty( $organization['LegalName'] ) ? $organization['LegalName'] : $organization['OrganisationName'] );
    5361
    54         $events = null;
     62        $events = [];
     63
     64        $offers = [];
     65
     66        foreach ( $prices as $priceNameId => $priceName ) {
     67            $offers[] = [
     68                '@type'         => 'Offer',
     69                'price'         => $priceName['Price'],
     70                'category'      => $priceName['Price'] == 0 ? 'Free' : 'Paid',
     71                'priceCurrency' => EDU()->get_option( 'eduadmin-currency', 'SEK' ),
     72                'name'          => $priceName['PriceNameDescription'],
     73            ];
     74        }
    5575
    5676        foreach ( $selected_course['Events'] as $event ) {
     
    6484                $_event['location']    = "Online";
    6585                $_event['description'] = 'On-demand';
     86
     87                if ( $event['OnDemandAccessDays'] == null && $selected_course['OnDemandAccessDays'] != null ) {
     88                    $event['OnDemandAccessDays'] = $selected_course['OnDemandAccessDays'];
     89                }
     90
     91                if ( $event['OnDemandAccessDays'] > 0 ) {
     92                    $_event['courseSchedule'] = [
     93                        '@type'           => 'Schedule',
     94                        'repeatFrequency' => 'Daily',
     95                        'repeatCount'     => $event['OnDemandAccessDays'],
     96                    ];
     97                } else {
     98                    $_event['courseSchedule'] = [
     99                        '@type'           => 'Schedule',
     100                        'duration'        => 'P1D',
     101                        'repeatFrequency' => 'Yearly',
     102                        'repeatCount'     => 99,
     103                    ];
     104                }
    66105            } else {
    67106                $_event['location']  = $event['City'];
    68107                $_event['startDate'] = $event['StartDate'];
    69108                $_event['endDate']   = $event['EndDate'];
     109
     110                $_event['courseSchedule'] = [
     111                    '@type'     => 'Schedule',
     112                    'startDate' => $event['StartDate'],
     113                    'endDate'   => $event['EndDate'],
     114                ];
    70115            }
    71116
     
    94139            ],
    95140            'hasCourseInstance'   => $events,
     141            'offers'              => $offers,
    96142        ];
    97143
  • eduadmin-booking/trunk/eduadmin.php

    r3009447 r3012782  
    1010 * Description: EduAdmin plugin to allow visitors to book courses at your website
    1111 * Tags:    booking, participants, courses, events, eduadmin, lega online
    12  * Version: 4.1.2
     12 * Version: 4.2.0
    1313 * GitHub Plugin URI: multinetinteractive/eduadmin-wordpress
    1414 * GitHub Plugin URI: https://github.com/multinetinteractive/eduadmin-wordpress
  • eduadmin-booking/trunk/readme.txt

    r3009447 r3012782  
    44Requires at least: 5.8
    55Tested up to: 6.4
    6 Stable tag: 4.1.2
     6Stable tag: 4.2.0
    77Requires PHP: 7.0
    88License: GPL3
     
    4646The full changelog available on [GitHub](https://github.com/MultinetInteractive/EduAdmin-WordPress/blob/production/CHANGELOG.md)
    4747
     48### [4.2.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.2...v4.2.0) (2023-12-21)
     49
     50
     51#### Features
     52
     53* 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)
     54
    4855### [4.1.2](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.1.1...v4.1.2) (2023-12-13)
    4956
     
    7279* **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)
    7380
    74 ### [4.0.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v3.11.1...v4.0.0) (2023-10-10)
    7581
    7682
    77 #### ⚠ BREAKING CHANGES
    78 
    79 * **Programme/Shortcodes:** Custom code with `do_shortcode` now needs to do
    80 `echo do_shortcode( '[eduadmin-programme-list]' );` after the change.
    81 Which is the intended way to use `do_shortcode` the previous versions
    82 were not working in the correct way.
    83 
    84 #### Bug Fixes
    85 
    86 * **Programme/Shortcodes:** Fixed an issue with Programme pages ([461c3bf](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/461c3bfac424d8614580ac4f7df2fe5d70161499))
    87 
    88 
    89 
Note: See TracChangeset for help on using the changeset viewer.