Are you looking to insert a new, custom table row between the Subtotal and Shipping Method radio buttons which appear on both the cart and checkout template?
Look no further than this code snippet!
Interestingly, you must echo table HTML for the content to show between the Subtotal and Shipping Options otherwise the content will appear above the table HTML.
This snippet is useful if there are most costs to show in the table or of you’d like to make some information super obvious to the customer.
/**
* Snippet Name: WooCommerce Show Custom Table Row Between Subtotal And Shipping Options
* Snippet Author: ecommercehints.com
*/
add_action( 'woocommerce_cart_totals_before_shipping', 'ecommercehints_show_custom_table_row', 20 ); // Show on cart
add_action( 'woocommerce_review_order_before_shipping', 'ecommercehints_show_custom_table_row', 20 ); // Show on checkout
function ecommercehints_show_custom_table_row() {
echo '
Custom Label
Custom Content
';
}