From aad06f6642bafcd1d9f4d4c33162de27c9278d45 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Mon, 17 Oct 2016 13:29:12 -0200 Subject: [PATCH] Fixed wrong variable in wc_get_related_terms --- includes/wc-product-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/wc-product-functions.php b/includes/wc-product-functions.php index 9b787fceeb7..d9a868a47ed 100644 --- a/includes/wc-product-functions.php +++ b/includes/wc-product-functions.php @@ -815,7 +815,7 @@ function wc_get_related_products( $product_id, $limit = 5, $exclude_ids = array( * @return array */ function wc_get_related_terms( $product_id, $taxonomy ) { - $terms = apply_filters( 'woocommerce_get_related_' . $taxonomy . '_terms', get_the_terms( $product_id, $term ), $product_id ); + $terms = apply_filters( 'woocommerce_get_related_' . $taxonomy . '_terms', get_the_terms( $product_id, $taxonomy ), $product_id ); return array_map( 'absint', wp_list_pluck( $terms, 'term_id' ) ); }