Skip to content

Commit 71ad5b0

Browse files
committedJun 10, 2021
fix: optimize query when gathering occurrences
1 parent 83fa3f5 commit 71ad5b0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎includes/wp-zoom-helper-functions.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,10 @@ function wp_zoom_get_occurrences( $type = 'webinars', $show_past = false ) {
172172
$objects = call_user_func( array( $wp_zoom, 'get_' . $type ) );
173173

174174
foreach ( $objects[ $type ] as $object ) {
175-
$object = call_user_func_array( array( $wp_zoom, 'get_' . substr( $type, 0, -1 ) ), array( $object['id'] ) );
175+
// phpcs:ignore WordPress.PHP.StrictComparisons
176+
if ( $type == 8 || $type == 9 ) {
177+
$object = call_user_func_array( array( $wp_zoom, 'get_' . substr( $type, 0, -1 ) ), array( $object['id'] ) );
178+
}
176179

177180
if ( ! isset( $object['start_time'] ) && ! isset( $object['occurrences'] ) ) {
178181
continue;

0 commit comments

Comments
 (0)