From 5a544feae6c071a039ed4e42eb2d9f526d0719eb Mon Sep 17 00:00:00 2001 From: Parviz Date: Tue, 14 Sep 2021 13:23:30 +0430 Subject: [PATCH] fix incomplete result of category population in multiselect option type incomplete response when population set to category in multi-select option type, because in WordPress term_taxonomy table term_id and term_taxonomy_id is not always equal. --- .../multi-select/class-fw-option-type-multi-select.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/includes/option-types/multi-select/class-fw-option-type-multi-select.php b/framework/includes/option-types/multi-select/class-fw-option-type-multi-select.php index 9b1c98e6..a6c00c21 100644 --- a/framework/includes/option-types/multi-select/class-fw-option-type-multi-select.php +++ b/framework/includes/option-types/multi-select/class-fw-option-type-multi-select.php @@ -156,7 +156,7 @@ private static function query_terms( array $options ) { $sql = "SELECT terms.term_id" . " FROM $wpdb->terms AS terms, $wpdb->term_taxonomy AS taxonomies" - . " WHERE terms.term_id = taxonomies.term_id AND taxonomies.term_id = taxonomies.term_taxonomy_id"; + . " WHERE terms.term_id = taxonomies.term_id"; { $prepare = array(); @@ -527,4 +527,4 @@ private static function filter_query_posts( $set ) { add_action( 'wp_ajax_fw_option_type_multi_select_autocomplete', array( "FW_Option_Type_Multi_Select", '_ajax_autocomplete' ) ); -endif; \ No newline at end of file +endif;