I would like to add an extra row to the Cart Table in Woommerce, but I can't find the right action.
From this file https://github.com/woocommerce/woocommerce/blob/master/templates/cart/cart.php, I would expect the 'woocommerce_after_cart_contents' action to be the right one (line 149), but it prints the content above the cart table. Am I missing anything?
Here's the code (in functions.php
):
function quality_certificates(){
echo '<tr>TEST</tr>';
}
add_action('woocommerce_cart_contents','quality_certificates');
And this is the output:
<form class="woocommerce-cart-form" action="..." method="post">
TEST<table class="shop_table ...">
etc.
<form>
tag.<tr>
to the table. From the woocommerce file I linked to, it seems like this is possible with'woocommerce_after_cart_contents'
. But using that hook actually places the code above the table, not inside of it.