WordPress at Your Fingertips
filter is not described

woocommerce_pre_remove_cart_item_from_session filter-hook . WC 3.6.0

Allow 3rd parties to validate this item before it's added to cart and add their own notices.


add_filter( 'woocommerce_pre_remove_cart_item_from_session', 'filter_function_name_8923', 10, 3 );
function filter_function_name_8923( $remove_cart_item_from_session, $key, $values ){
	// filter...

	return $remove_cart_item_from_session;
If true, the item will not be added to the cart.
Default: false
Cart item key.
Cart item values e.g. quantity and product_id.


Since 3.6.0 Introduced.

Where the hook is called

woocommerce/includes/class-wc-cart-session.php 127
if ( apply_filters( 'woocommerce_pre_remove_cart_item_from_session', false, $key, $values ) ) {

Where in WP core the hook is used WooCommerce

Usage not found.