Skip to content

Commit 5438067

Browse files
author
Chris Gårdenberg
committed
fix(Interest registration/Event): If the course is on demand, we should load that variant, to get the proper events.
1 parent f33a0be commit 5438067

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

content/template/interestRegTemplate/interest-reg-event.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
$selected_course = $edo;
2626
}
2727

28+
$is_ondemand = $selected_course['OnDemand'];
29+
30+
if ( $is_ondemand ) {
31+
$selected_course = json_decode( EDUAPIHelper()->GetOnDemandCourseDetailInfo( $course_id, $group_by_city ), true );
32+
}
33+
2834
if ( ! $selected_course ) {
2935
?>
3036
<script>history.go(-1);</script>
@@ -63,7 +69,7 @@ class="backLink"><?php echo esc_html_x( '« Go back', 'frontend', 'eduadmin-book
6369
<h1 class="courseTitle"><?php echo esc_html( $name ); ?> - <?php echo esc_html_x( 'Inquiry', 'frontend', 'eduadmin-booking' ); ?></h1>
6470
</div>
6571
<div class="dateInfo">
66-
<?php echo edu_event_item_date( $event, null );
72+
<?php edu_event_item_date( $event, null );
6773
echo esc_html( edu_output_event_venue( array( $event['AddressName'], $event['City'] ), '&nbsp;' ) );
6874
?>
6975
</div>

0 commit comments

Comments
 (0)