There is a WooCommerce Hook called woocommerce_cart_collaterals that displays a text in a div that I would like to change.
This is the short form of the unmodified HTML output:
<div class="cart-collaterals">
<div class="cross-sells">
<h2>You might be interested in...</h2>
...
</div>
</div>
I would like to change the text inside the h2. I have added an action for this hook but the given argument variable is just empty, I don't know what to do to get access to the h2.
This is what I've tried by adding to the theme's functions.php:
function action_woocommerce_cart_collaterals( $woocommerce_cart_totals) {
print_r($woocommerce_cart_totals);
};
add_action( 'woocommerce_cart_collaterals', 'action_woocommerce_cart_collaterals', 10, 1);
What to do I need to modify to edit the text output in the h2?