function atrs() {
global $product;
$atrs = get_the_terms($product->get_id(), 'pa_atr');
foreach ($atrs as $atr) {
$icon = get_field('classicon', 'term_' .$atr->term_id);
echo '<a target="_blank" href="' . get_site_url() . '/shop/?pa_atr=' . $atr->slug . '">'. $atr->name . ' </a>';
echo '<i class="fa fa-"' . $icon . '></i>';
}
}
global $wpdb;
$user = get_userdata( $comment->user_id );
$user_id = $user->ID;
$comment_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) AS total FROM $wpdb->comments WHERE comment_approved = 1 AND user_id = %s", $user_id ) );
echo $comment_count;