From 3a89d6fae820e348ee865dfe3b76083e60d0b08a Mon Sep 17 00:00:00 2001 From: Yasir Arafat <148990700+Arafat-plugins@users.noreply.github.com> Date: Mon, 16 Mar 2026 12:26:55 +0600 Subject: [PATCH] Fix TypeError when _directory_type term meta is stored as string --- includes/helper-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/helper-functions.php b/includes/helper-functions.php index ab3033588e..1a310a3f0a 100644 --- a/includes/helper-functions.php +++ b/includes/helper-functions.php @@ -2266,7 +2266,7 @@ function search_category_location_filter( $settings, $taxonomy_id, $prefix = '' $directory_type = get_term_meta( $term->term_id, '_directory_type', true ); $icon = get_cat_icon( $term->term_id ); $icon_src = \Directorist\Helper::get_icon_src( $icon ); - $directory_type = ! empty( $directory_type ) ? $directory_type : []; + $directory_type = ! empty( $directory_type ) ? (array) $directory_type : []; if ( in_array( $settings['listing_type'], $directory_type ) ) { $settings['term_id'] = $term->term_id;