WordPress action hook

woocommerce_before_cart_collaterals

Defined by WooCommerce and fired by 26 plugins in total, running on 8.6M+ sites between them.

How to use woocommerce_before_cart_collaterals

It's an action: your callback runs at that point. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'woocommerce_before_cart_collaterals', function() {
	// Your code runs here.
}, 10, 1 );

Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

26 plugins that fire woocommerce_before_cart_collaterals

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce icon WooCommerce7+ million installs do_action( 'woocommerce_before_cart_collaterals' ) templates/cart/cart.php:221
  2. Essential Addons for Elementor icon Essential Addons for Elementor1+ million installs do_action( 'woocommerce_before_cart_collaterals' ) includes/Template/Woocommerce/Cart/Woo_Cart_Helper.php:703
  3. Royal Addons for Elementor icon Royal Addons for Elementor600,000+ installs do_action( 'woocommerce_before_cart_collaterals' ) includes/woocommerce/templates/cart/cart.php:163
  4. CoDesigner icon CoDesigner4,000+ installs do_action( 'woocommerce_before_cart_collaterals' ) widgets/cart-items/cart-items.php:2187
  5. WowStore icon WowStore4,000+ installs do_action( 'woocommerce_before_cart_collaterals' ) blocks/woo/cart_table/Template.php:278
  6. Instantio icon Instantio700+ installs do_action( 'woocommerce_before_cart_collaterals' ) includes/templates/cart-modern.php:250
  7. MarketKing icon MarketKing700+ installs do_action( 'woocommerce_before_cart_collaterals' ) public/templates/cart.php:57
  8. ShopPress icon ShopPress600+ installs do_action( 'woocommerce_before_cart_collaterals' ) public/templates/cart/cart.php:16
  9. StoreBuild icon StoreBuild400+ installs do_action( 'woocommerce_before_cart_collaterals' ) public/woocommerce/cart/cart.php:205
  10. CRT Addons Builder and Widgets for Elementor icon CRT Addons Builder and Widgets for Elementor300+ installs do_action( 'woocommerce_before_cart_collaterals' ) includes/customizer/addons/templates/cart/cart.php:163
  11. Free Product Sample for WooCommerce icon Free Product Sample for WooCommerce200+ installs do_action( 'woocommerce_before_cart_collaterals' ) public/partials/woocommerce/cart/cart.php:166
  12. KiriminAja Official icon KiriminAja Official200+ installs do_action( 'woocommerce_before_cart_collaterals' ) templates/woocommerce/cart/cart.php:195
  13. Shopready icon Shopready100+ installs do_action( 'woocommerce_before_cart_collaterals' ) src/extension/templates/presets/cart/cart.php:654
  14. ShopMaker icon ShopMaker90+ installs do_action( 'woocommerce_before_cart_collaterals' ) templates/widgets/sm-parts/cart-total.php:12
  15. AMP WooCommerce icon AMP WooCommerce90+ installs do_action( 'woocommerce_before_cart_collaterals' ) templates/cart/cart.php:179
  16. Gift Vouchers for WooCommerce icon Gift Vouchers for WooCommerce80+ installs do_action( 'woocommerce_before_cart_collaterals' ) templates/cart/cart.php:180
  17. WebSync Checkout for Elementor icon WebSync Checkout for Elementor60+ installs do_action( 'woocommerce_before_cart_collaterals' ) templates/cart/custom-cart.php:174
  18. Elite Elementor Addons and Widgets icon Elite Elementor Addons and Widgets20+ installs do_action( 'woocommerce_before_cart_collaterals' ) includes/woocommerce/templates/cart/cart.php:163
  19. Max Elements for Elementor icon Max Elements for Elementor10+ installs do_action( 'woocommerce_before_cart_collaterals' ) elementor/helpers/woo_cart.php:659
  20. Categorized Cart Page For Woocommerce icon Categorized Cart Page For Woocommerce10+ installs do_action( 'woocommerce_before_cart_collaterals' ) templates/cart.php:177
  21. ACL icon ACL10+ installs do_action( 'woocommerce_before_cart_collaterals' ) includes/cart/class-wooacd-cart-frontend.php:196
  22. Formdev icon Formdev10+ installs do_action( 'woocommerce_before_cart_collaterals' ) templates/cart.php:292
  23. Cresta Checkout for WooCommerce icon Cresta Checkout for WooCommerceFewer than 10 installs do_action( 'woocommerce_before_cart_collaterals' ) templates/wc/cart/cart.php:20
  24. PaymentIQ Checkout icon PaymentIQ CheckoutFewer than 10 installs do_action( 'woocommerce_before_cart_collaterals' ) templates/paymentiq-cart-page.php:162
  25. Portus Cart Page icon Portus Cart PageFewer than 10 installs do_action( 'woocommerce_before_cart_collaterals' ) templates/cart.php:73
  26. Samply icon SamplyFewer than 10 installs do_action( 'woocommerce_before_cart_collaterals' ) includes/Frontend/views/woocommerce/cart/cart.php:166

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.