Get related products based on product category and tags.
wc_get_product_term_ids( $product_id, 'product_cat'
Sortie :
@param int $product_id Product ID. @param int $limit Limit of results. @param array $exclude_ids Exclude IDs from the results. @param array $related_by Related by category and tags boolean flags. @return array
// Modifier la valeur avec le filtre 'woocommerce_get_related_product_cat_terms'
add_filter('woocommerce_get_related_product_cat_terms', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre(wc_get_product_term_ids( $product_id) {
// Modifier la valeur
return wc_get_product_term_ids( $product_id;
}
Chargement des actualités...