woocommerce_cart_is_elegible_for_product_sale
Hook
Filter
Filter if cart is eligible for product sale.
This hook has been deprecated. Use woocommerce_cart_is_eligible_for_product_sale instead.
Description
This filter allows modifying the cart eligibility for selling products. This could be useful in some cases when it's not possible to determine if every item in the WooCommerce's cart represent a product. For example, when the products were created used a plugin that define custom product types or doesn't use the standard WC_Product
class.
Parameter | Type | Description |
---|---|---|
$is_eligible | bool | Actual eligibility state |
Changelog
Version | Description |
---|---|
2.0.0 | Introduced |
3.0.0 | Deprecated |
Usage Example
add_filter('woocommerce_cart_is_elegible_for_product_sale', function($is_eligible){
$is_eligible = ... // Modify the default value
return $is_eligible;
});
Updated about 1 month ago