Trying to parse attributes through custom product loop for custom product template
I'm able to get image and title but not attributes. I have this error
Fatal error: Call to undefined function get_attribute()
<?php
global $wpdb;
global $product;
$taxrates = $wpdb->get_results($query);
foreach ($taxrates as $taxrate) {
echo get_attribute($taxrate->products_id( 'pa_info' ));
echo get_the_title($taxrate->products_id);
echo get_the_post_thumbnail($taxrate->products_id);
echo $taxrate->rate_2;
echo $taxrate->rate_2;
echo $taxrate->rate_3;
}
?>