diff --git a/classes/class-ep-api.php b/classes/class-ep-api.php index bccce9cb8e..422947a88f 100644 --- a/classes/class-ep-api.php +++ b/classes/class-ep-api.php @@ -698,10 +698,11 @@ private function prepare_terms( $post ) { foreach ( $object_terms as $term ) { if( ! isset( $terms_dic[ $term->term_id ] ) ) { $terms_dic[ $term->term_id ] = array( - 'term_id' => $term->term_id, - 'slug' => $term->slug, - 'name' => $term->name, - 'parent' => $term->parent + 'term_id' => $term->term_id, + 'slug' => $term->slug, + 'name' => $term->name, + 'parent' => $term->parent, + 'term_taxonomy_id' => $term->term_taxonomy_id, ); if( $allow_hierarchy ){ $terms_dic = $this->get_parent_terms( $terms_dic, $term, $taxonomy->name ); diff --git a/features/woocommerce/woocommerce.php b/features/woocommerce/woocommerce.php index 09cd3f945e..3e7e517b5e 100644 --- a/features/woocommerce/woocommerce.php +++ b/features/woocommerce/woocommerce.php @@ -133,10 +133,10 @@ function ep_wc_convert_post_object_to_id( $posts ) { * @return array */ function ep_wc_whitelist_taxonomies( $taxonomies, $post ) { - $woo_taxonomies = array(); - $product_type = get_taxonomy( 'product_type' ); + $product_type = get_taxonomy( 'product_type' ); + $product_visibility = get_taxonomy( 'product_visibility' ); - $woo_taxonomies[] = $product_type; + $woo_taxonomies = array( $product_type, $product_visibility ); /** * Note product_shipping_class, product_cat, and product_tag are already public. Make @@ -233,6 +233,7 @@ function ep_wc_translate_args( $query ) { 'product_tag', 'product_type', 'pa_sort-by', + 'product_visibility', ); /** diff --git a/includes/mappings/5-0.php b/includes/mappings/5-0.php index f8f14eac7f..137756f8be 100644 --- a/includes/mappings/5-0.php +++ b/includes/mappings/5-0.php @@ -147,6 +147,9 @@ 'term_id' => array( 'type' => 'long', ), + 'term_taxonomy_id' => array( + 'type' => 'long', + ), 'parent' => array( 'type' => 'long', ), diff --git a/includes/mappings/pre-5-0.php b/includes/mappings/pre-5-0.php index 78b2310e28..97d8297fc0 100644 --- a/includes/mappings/pre-5-0.php +++ b/includes/mappings/pre-5-0.php @@ -158,6 +158,9 @@ 'term_id' => array( 'type' => 'long', ), + 'term_taxonomy_id' => array( + 'type' => 'long', + ), 'parent' => array( 'type' => 'long', ), @@ -377,4 +380,4 @@ ), ), ), -); \ No newline at end of file +);