WordPress filter hook
woocommerce_update_cart_validation
Defined by WooCommerce and fired by 33 plugins in total, running on 8.6M+ sites between them.
How to use woocommerce_update_cart_validation
It's a filter: your callback receives the value and 3 more arguments, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_update_cart_validation', function( $value, $cart_item_key, $values, $quantity ) {
// Change $value here.
return $value;
}, 10, 4 );Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
33 plugins that fire woocommerce_update_cart_validation
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $values, $quantity )includes/class-wc-form-handler.php:865 -
Essential Addons for Elementor1+ million installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $cart_item, $cart_item_quantity )includes/Traits/Helper.php:349 -
Premium Addons for Elementor600,000+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $item_key, $cart_item, $quantity )modules/woocommerce/modules/mini-cart-module.php:181 -
SellKit7,000+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $cart_item, $qty )includes/elementor/modules/checkout/classes/global-hooks.php:326 -
Add to Cart Redirect for WooCommerce6,000+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $values, $quantity )public/class-change-quantity-checkout.php:131 -
XT Floating Cart for WooCommerce4,000+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $cart_item, $cart_item_qty )public/class-ajax.php:197 -
Mini Ajax Cart for WooCommerce800+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_key, $cart_item, $qty )classes/frontend-class.php:66 -
Food Online for WooCommerce300+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $fdoe_product_values, $fdoe_product_quantity )classes/class-fdoe-ajax.php:32 -
Androapp300+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $values, $quantity )class-pw-wp-woocommerce.php:362 -
One Page Quick Checkout for WooCommerce200+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $cart_item, $quantity )includes/ajaxhandler.php:285 -
Bolt Checkout for WooCommerce100+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $values, $update_quantity )includes/classes/class-bolt-update-cart.php:316 -
Wholesale Order Table for WooCommerce70+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $product_values, $product_quantity )classes/class-otfw-ajax.php:216 -
Nexvio for WooCommerce50+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $key, $item, $qty )includes/class-nexvio-side-cart.php:527 -
Awesome Checkout Templates40+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $threeball_product_values, $threeball_product_quantity )public/front-checkout.php:571 -
SaleDash10+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $values, $quantity )includes/api/class-w2w-rest-cart-controller.php:416 -
Ajax Shop Loop Quantity for WooCommerce10+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $our_product_values, $our_product_quantity )includes/functions.php:27 -
Restaurant for WooCommerce10+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $key, $item, $qty )classes/ajax.php:444 -
Single Page Restaurant Menu for WooCommerce10+ installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $product, $quantity )includes/sprm-ajax-actions.php:128 -
Pablo MeasureCartFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $values, $quantity )includes/class-cart.php:256 -
Jacklabs One Step CheckoutFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $key, $cart_item, $quantity )includes/class-jlosc-ajax.php:159 -
Ajax mini cart for WoocommerceFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $threeball_product_values, $threeball_product_quantity )src/zt-front-end.php:370 -
Cresta Checkout for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $key, $item, $quantity )inc/class-cbc-cart.php:158 -
YayCheckoutFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $values, $quantity )includes/Renderer/CartItemQuantity.php:103 -
Arshida Toolkit for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $values, $quantity )src/WC/Main.php:162 -
SeyaqFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $key, $item, $quantity )includes/class-seyaq-sa-operations.php:447 -
Aiolos Checkout for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $key, $item, $quantity )src/Cart/CartItem.php:551 -
IPS Cart&Checkout for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $key, $item, $quantity )includes/classes/Front/Cart/CartItemQuantity.php:46 -
Nanflows Sliding CartFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $key, $item, $quantity )includes/class-ajax.php:318 -
Pexalvo Side CartFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_key, $item, $qty )includes/class-pexalvo-plugin.php:672 -
CartexaFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $cart_item, $qty )includes/class-cartexa-ajax.php:191 -
Antom Shopping AgentFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $key, $cart_item, $quantity )includes/class-pay-api.php:695 -
Smart Cart for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $key, $item, $qty )includes/features/cart-api/trait-item-actions.php:97 -
Single Page ShoppingFewer than 10 installs
apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $values, $quantity )includes/class-awcs-wc-cart-actions.php:148
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.