WooCommerce Checkout Block: Add an Order Bump

Updated On:

,By

How to Add an Order Bump to the WooCommerce Block Checkout Page (No jQuery, No Legacy AJAX)

The new WooCommerce Checkout Block brings a modern React-based checkout experience. But customizing it — like adding an order bump — requires a slightly different approach compared to classic shortcodes or hooks.

In this guide, you’ll learn how to:

  • Insert a specific product (by ID) as an order bump.
  • Render the product in a list-style layout.
  • Add the bump product to the cart using modern WooCommerce JS (not $.ajax or admin-ajax.php).

Step 1: Inject HTML After a Specific Checkout Block

In block themes, hooks like woocommerce_before_checkout_form don’t work. Instead, we use render_block to inject our custom HTML container directly after the checkout block.

PHP – Add HTML container for the order bump:

Replace 123 with your bump product ID.


Step 2: Move the Container into Position After Checkout Block Renders

React renders the checkout in parts, so you can’t insert your bump HTML right away. Use polling (setInterval) to wait until the DOM node appears.

JS – Wait and inject the bump:


Step 3: Render the Product in List Format via REST API

Let’s fetch the product using WooCommerce’s REST API and show it inside the order bump container.

JS – Fetch and display product:


Step 4: Add to Cart Using WooCommerce Store API (Not jQuery AJAX)

WooCommerce’s block-based system uses the Store API and JS events. Use the @woocommerce/blocks-checkout client or call the REST endpoint directly.

JS – Add product to cart with fetch (no jQuery):


Final Notes

  • You can customize the renderOrderBump() function to show multiple products or a custom layout.
  • Styling can be adjusted with CSS or Tailwind.
  • Use the wc/store/cart endpoints for quantity changes, removals, etc.
  • You don’t need jQuery or admin-ajax.php.

Bonus: Support Multiple Order Bumps?

Just repeat the container with different data-product-ids and render them dynamically.

Crazy about CRO?

Dessert Calories Don’t Count

Our Sales Funnel Strategy does.

We don’t spam! Read more in our privacy policy

Leave a Reply

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