Hot To Add Custom HTML To The WooCommerce Checkout Page

Adding custom HTML to the checkout page is pretty simple, but it does take a small amount of PHP. 

Step 1: Where do you want to add the custom HTML?

You first need to decide where you want to output your custom HTML. The easiest way to do this is to look at our Visual Hook Guide. This allows you to see exactly where each action hook outputs.

Simply pick an action hook and proceed to step 2.

For our purposes, we’ll use this one: cfw_after_cart_summary

Step 2: Write a PHP snippet to output your custom HTML

Using the WordPress Action Hook API we can insert our HTML anywhere.

Here’s an example using cfw_after_cart_summary:

You can modify this example to suit your needs.

Step 3: Deploy your custom HTML block

To deploy your custom HTML block, you have a few options:

  1. You can add it as a PHP Snippet here: WP Admin > CheckoutWC > Advanced > Scripts > PHP Snippets
  2. You can add it to your child theme’s functions.php file
  3. You can use a plugin like Code Snippets.