Skip to content

Commit a863289

Browse files
author
Chris Gårdenberg
committed
Adding action eduadmin-bookingform-loaded to enable plugins to hook in after form is loaded
1 parent df962cf commit a863289

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

content/template/bookingTemplate/template_A.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,10 @@
279279
}
280280
?>
281281
<?php
282-
$noInvoiceFreeEvents = get_option( 'eduadmin-noInvoiceFreeEvents', false );
283-
$singlePersonBooking = get_option( 'eduadmin-singlePersonBooking', false );
284-
$showInvoiceEmail = isset( $attributes['hideinvoiceemailfield'] ) ? $attributes['hideinvoiceemailfield'] == false : get_option( 'eduadmin-hideInvoiceEmailField', false ) == false;
285-
$forceShowInvoiceInformation = isset( $attributes['showinvoiceinformation'] ) ? $attributes['showinvoiceinformation'] == true : get_option( 'eduadmin-showInvoiceInformation', false ) == true;
282+
$noInvoiceFreeEvents = get_option( 'eduadmin-noInvoiceFreeEvents', false );
283+
$singlePersonBooking = get_option( 'eduadmin-singlePersonBooking', false );
284+
$showInvoiceEmail = isset( $attributes['hideinvoiceemailfield'] ) ? $attributes['hideinvoiceemailfield'] == false : get_option( 'eduadmin-hideInvoiceEmailField', false ) == false;
285+
$forceShowInvoiceInformation = isset( $attributes['showinvoiceinformation'] ) ? $attributes['showinvoiceinformation'] == true : get_option( 'eduadmin-showInvoiceInformation', false ) == true;
286286
if ( $singlePersonBooking ) {
287287
include_once( "singlePersonBooking.php" );
288288
} else {
@@ -392,7 +392,7 @@
392392
foreach ( $errorList as $error ) {
393393
?>
394394
<div class="edu-modal warning">
395-
<?php _e( $error, 'eduadmin' ); ?>
395+
<?php _e( $error, 'eduadmin-booking' ); ?>
396396
</div>
397397
<?php
398398
}
@@ -430,5 +430,6 @@
430430
<?php
431431
}
432432
}
433+
do_action( 'eduadmin-bookingform-loaded', EDU()->session['eduadmin-loginUser'] );
433434
$out = ob_get_clean();
434435
return $out;

eduadmin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Plugin URI: http://www.eduadmin.se
88
* Description: EduAdmin plugin to allow visitors to book courses at your website
99
* Tags: booking, participants, courses, events, eduadmin, lega online
10-
* Version: 1.0.3
10+
* Version: 1.0.4
1111
* GitHub Plugin URI: multinetinteractive/eduadmin-wordpress
1212
* GitHub Plugin URI: https://github.com/multinetinteractive/eduadmin-wordpress
1313
* Requires at least: 3.0

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Contributors: mnchga
44
Tags: booking, participants, courses, events, eduadmin, lega online
55
Requires at least: 3.0
66
Tested up to: 4.8.3
7-
Stable tag: 1.0.3
7+
Stable tag: 1.0.4
88
Requires PHP: 5.0.1 (with SoapClient)
99
License: GPL3
1010
License-URI: https://www.gnu.org/licenses/gpl-3.0.en.html
@@ -35,6 +35,9 @@ Requires at least PHP 5.0.1 (with [SoapClient](http://php.net/manual/en/book.soa
3535

3636
== Changelog ==
3737

38+
### [1.0.4]
39+
- Adding action `eduadmin-bookingform-loaded`, so that plugins can fire when the booking form is loaded.
40+
3841
### [1.0.3]
3942
- Removing `.official.plugin` and `auto_update`, since we are running as a normal plugin now.
4043

0 commit comments

Comments
 (0)