diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index f06e6f57d25..22e3facc311 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -1172,6 +1172,7 @@ class WC_Cart extends WC_Legacy_Cart { */ public function set_quantity( $cart_item_key, $quantity = 1, $refresh_totals = true ) { if ( 0 === $quantity || $quantity < 0 ) { + wc_do_deprecated_action( 'woocommerce_before_cart_item_quantity_zero', array( $cart_item_key, $this ), '3.7.0', 'woocommerce_remove_cart_item' ); // If we're setting qty to 0 we're removing the item from the cart. return $this->remove_cart_item( $cart_item_key ); }