Title: woocommerce_products_will_display() function issue
Last modified: July 14, 2017

---

# woocommerce_products_will_display() function issue

 *  [andrew1994](https://wordpress.org/support/users/andrew1994/)
 * (@andrew1994)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/woocommerce_products_will_display-function-issue/)
 * I use woocommerce_products_will_display() function to validate HTML part, that
   will be show on the product-archive page. It works but, has an issue with the
   custom taxonomy, if custom taxonomy has child, and child has more than one product
   woocommerce_products_will_display() return false.
    I think the problem is in 
   this part of code
 *     ```
       if ( empty( $term->term_id ) || empty( $term->taxonomy ) ) {
           return true;
       }
       ```
   
 * Why return true if the taxonomy is empty?
    If I change it to this
 *     ```
       if ( ! empty( $term->term_id ) || ! empty( $term->taxonomy ) ) {
           return true;
       }
       ```
   
 * all works fine.

The topic ‘woocommerce_products_will_display() function issue’ is closed to new 
replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [custom taxonomy](https://wordpress.org/support/topic-tag/custom-taxonomy/)
 * [development](https://wordpress.org/support/topic-tag/development/)

 * 0 replies
 * 1 participant
 * Last reply from: [andrew1994](https://wordpress.org/support/users/andrew1994/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/woocommerce_products_will_display-function-issue/)
 * Status: not resolved