In woocommerce I am able to display some formatted product attributes under my products on the archives pages with the following code:
add_action('woocommerce_after_shop_loop_item', 'displaying_product_attributes');
function displaying_product_attributes() {
global $product;
$product_driver = $product->get_attribute('pa_driver');
$product_passenger = $product->get_attribute('pa_passenger');
echo "<p style='color:red;'>".$product_driver."</p>";
echo "<p style='color:red;'>".$product_passenger."</p>";
}
How can I do the same thing on the cart items (in Woocommerce cart and checkout pages)?