WooCommerce Show Custom Content Between Subtotal And Shipping Options

WooCommerce cart showing a custom row of content

Pre-Requisites

There are no pre-requisites in order for you to be able to implement this solution.

How To Implement This Solution?

Simply copy the pre-coded solution to your active theme’s functions.php or preferably the Code Snippets Plugin.

About this Solution

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 ' <tr>
            <th>Custom Label</th>
            <td>Custom Content</td>
        </tr>';
    }
				
			

Snippet Benefits

  • Show content between the Subtotal and Shipping Method Options on the Cart and Checkout template.
  • Make information super clear to customers before they purchase.
WooCommerce Conversion Rate Optimisation (CRO) eBook
100 WooCommerce Conversion Rate Optimisation Tips

Leave a Reply

If you are going to write code in the comments, please wrap it between code tags.

Your email address will not be published. Required fields are marked *

Other Recent Guides

Subscribe To Emails

Get exclusive WooCommerce tips that I only share with email subscribers

Join hundreds of other subscribers