File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535
3636 $ pricenames = array ();
3737 foreach ( $ selected_course ['PriceNames ' ] as $ pn ) {
38- $ pricenames [] = $ pn[ ' Price ' ] ;
38+ $ pricenames [] = $ pn ;
3939 }
4040 foreach ( $ event ['PriceNames ' ] as $ pn ) {
41- $ pricenames [] = $ pn[ ' Price ' ] ;
41+ $ pricenames [] = $ pn ;
4242 }
4343
4444 $ event = array_merge ( $ event ['CourseTemplate ' ], $ event );
Original file line number Diff line number Diff line change 11<?php
22
33$ regions_with_public_locations = array ();
4- foreach ( $ regions ['value ' ] as $ region ) {
5- foreach ( $ region ['Locations ' ] as $ location ) {
6- if ( $ location ['PublicLocation ' ] ) {
7- $ regions_with_public_locations [] = $ region ;
8- break ;
4+ if ( ! empty ( $ regions ) && ! empty ( $ regions ['value ' ] ) ) {
5+ foreach ( $ regions ['value ' ] as $ region ) {
6+ foreach ( $ region ['Locations ' ] as $ location ) {
7+ if ( $ location ['PublicLocation ' ] ) {
8+ $ regions_with_public_locations [] = $ region ;
9+ break ;
10+ }
911 }
1012 }
1113}
Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ This method generates a unique transient-name based on the name and the argument
4545- chg: Redoing most of the code fetching data from EduAdmin (Adding ` $select ` , to decrease the amount of data fetched)
4646- add: Added new class ` EduAdminAPIHelper ` , that I'm using to deduplicate code.
4747- per: Adding more performance fixes, that should solve some issues.
48-
48+ - fix: Fixed a problem with showing price names in the detail view.
49+ - add: Added extra check for regions, so we don't loop over empty objects
4950
5051### 2.0.18
5152- fix: Proper sorting on event dates. (Using ` sort ` on an ` array ` was stupid)..
You can’t perform that action at this time.
0 commit comments