How many times have you bought something online and seen trust symbols near the proceed to checkout button on the cart page? “30 Day Money Back Guarantee” or “Secure Checkout” are popular examples. By default, there are no trust symbols or content under the proceed to checkout button on the cart page. But in this guide, we’ll show you how to add content under the proceed to checkout button on the cart page by using the woocommerce_after_cart_totals hook. Using this snippet, you’ll be able to add trust symbols, shipping information, or any other custom message you like!
Code Solution
For this solution two work, we have provided two separate code snippets. The first displays the actual content and the other styles it properly as shown in the example.
Snippet 1
/**
* Snippet Name: WooCommerce How To Add Content Under The Proceed To Checkout Button On The Cart Page
* Snippet Author: ecommercehints.com
*/
function action_woocommerce_after_cart_totals( ) {
echo ' Secure Checkout';
};
add_action( 'woocommerce_after_cart_totals', 'action_woocommerce_after_cart_totals', 10, 0 );
Snippet 2
add_action( 'wp_head', function () {
if (is_cart()) { ?>