Cart, Checkout

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.

100 WooCommerce Conversion Rate Optimisation Tips

This field is for validation purposes and should be left unchanged.

Let’s collaborate!

Need to outsource WordPress development?

Join forces with UnlimitedWP for an outsourced white label web development service you can truly rely on.

First Timer Here?

Sign up to receive 20% off on your first month with us.

26027
WELCOME OFFER