Skip to content

Mini-Cart & Checkout Summary Support

Dino Discounts shows two kinds of thing in a cart:

  • The totals. Discounts are applied inside WooCommerce’s own cart calculation, so every subtotal and total WooCommerce shows already includes them, and so does the order that is placed. This does not depend on your theme.
  • The annotations. The itemised discount lines in a mini-cart drawer, the “Free gift:” prefix and “Free” price on a gift line, per-item discount notes, and the spend-more message. These are drawn into the theme’s own cart markup, so they appear where Dino recognises that markup.

On a theme surface Dino does not recognise, the annotations may not appear, but the totals are always correct. The shopper is charged the right amount whatever the drawer looks like.

SurfaceWhat Dino showsHow
Classic cart page and classic checkout order summary”Free gift:” prefix, “Free” price and subtotal, fixed quantity on gift lines; discount rows in the totalsWooCommerce’s standard cart-item filters, so any theme or template that uses WooCommerce’s cart templates gets them
Block Cart and block CheckoutThe same gift treatment, read from the Store APIWooCommerce Blocks’ own checkout filters
Essential Addons for Elementor Woo Checkout widgetThe gift treatment above. Dino also corrects the summary when EAEL leaves it showing a stale coupon or total after an apply or removeA guard script loaded only when Essential Addons is active, on the classic checkout

Dino adds its discount lines (and the spend-more message, unless spend-more nudges are switched off, or the mini-cart slot is set to Not shown, in Message Settings) to these drawers:

DrawerRecognised by
WooCommerce classic mini-cart widget, as used by most classic themes.widget_shopping_cart_content
Elementor Pro Menu Cartthe same container, with Elementor’s .elementor-menu-cart__* footer, subtotal and product list
WooCommerce Mini-Cart block drawer.wc-block-mini-cart__drawer

Inside a recognised drawer, the discount lines go just above the footer buttons. If there are no buttons they go after the subtotal, and failing that, at the end of the drawer. A page with both a classic header mini-cart and a Mini-Cart block gets both decorated.

Two extras depend on the drawer type:

  • Per-item discount notes and the “Free” gift badge are added to classic and Elementor mini-cart items (.woocommerce-mini-cart-item, .mini_cart_item, .elementor-menu-cart__product), and gift rows in the Mini-Cart block are tagged as free.
  • A net “after discounts” total is added to the Mini-Cart block drawer only. That drawer shows a pre-discount subtotal and has no slot for a discounted total, so Dino works it out from the subtotal the drawer displays.

The store-wide Discount label settings in Message Settings still apply on every supported surface. A discount line you have hidden on the mini-cart or at checkout stays hidden there.

The drawer layer loads only on stores with WooCommerce cart fragments (classic themes) or WooCommerce Blocks available.

A cart drawer or order summary built with its own markup — a side-cart plugin, a theme’s custom slide-out cart, a page-builder widget not listed above — is not recognised by those selectors. On such a surface:

  • Totals are correct. Every price, subtotal and total WooCommerce or the theme displays from WooCommerce’s cart already includes the discount.
  • Dino’s itemised discount lines and spend-more message are not shown in that drawer unless a developer registers it (below).
  • The gift line may or may not read “Free gift:” / “Free”. If the drawer renders its lines through WooCommerce’s standard cart-item filters, it does. If it builds them some other way, the gift shows as an ordinary £0.00 line.

The cart and checkout pages themselves are usually unaffected, because most themes keep WooCommerce’s templates there.

If a theme’s cart layer clashes with Dino’s, a developer can switch Dino’s drawer layer off entirely:

add_filter( 'dino_discounts_enable_cart_ui_sync', '__return_false' );

This also turns off Dino’s removal of a duplicate spend-more message, so the mini-cart copy may then show alongside the cart page’s own.

A developer can register a theme’s own drawer so Dino adds its discount lines and spend-more message there, with the dino_discounts_mini_cart_selectors filter:

add_filter( 'dino_discounts_mini_cart_selectors', function ( $selectors ) {
$selectors['drawer'][] = '.my-theme-cart-drawer';
$selectors['items'][] = '.my-theme-cart-drawer__products';
$selectors['footer'][] = '.my-theme-cart-drawer__actions';
return $selectors;
} );
  • drawer is the drawer’s container. items is its product list: Dino waits for it before drawing, so a drawer with its own list needs both.
  • footer is the button row the discount lines go above. subtotal is the row they go below when there is no footer. With neither, they go at the end of the drawer.
  • Per-item discount notes and the “Free” gift badge stay on the built-in drawers.

A checkout whose order summary Dino does not recognise can be registered with dino_discounts_checkout_summary_selectors, so Dino corrects that summary after an Apple Pay or Google Pay payment is declined:

add_filter( 'dino_discounts_checkout_summary_selectors', function ( $selectors ) {
$selectors[] = '.my-checkout-summary';
return $selectors;
} );

Selectors can use element names, classes, ids and attribute tests, joined by spaces or >, +, ~. Anything else is ignored, including pseudo-classes such as :not() and comma lists. Register each selector as its own entry.

A drawer that is neither built in nor registered gets nothing from Dino. Dino does not detect unknown drawers by itself, and the totals stay correct either way.

  • Compatibility Center — workarounds for specific checkout conflicts, switched on per store.
  • Cart Labels — the wording of the labels shown on cart lines.

WooCommerce is a trademark of Automattic, Inc. WordPress is a trademark of the WordPress Foundation. Dino Discounts is not affiliated with or endorsed by Automattic or the WordPress Foundation.

Contact · Report a bug