You can easily exclude certain product types — such as virtual, downloadable, or external products — from the Pick List using a simple code snippet.
This is useful when you only want to pick and pack physical products.
Note: Hook added in Pick List vs 2.5.8 (please update if needed)
How It Works
The plugin includes a filter hook:
cas_picklist_include_order_item
This hook allows you to control whether a specific order item should be included in the pick list.
Example: Exclude Virtual, Downloadable, and External Products
You can add this code using the Code Snippets plugin or in your theme’s functions.php
file:
add_filter( 'cas_picklist_include_order_item', function ( $include, $item, $product, $order ) {
if ( $product && (
$product->is_virtual() ||
$product->is_downloadable() ||
'external' === $product->get_type()
) ) {
return false;
}
return $include;
}, 10, 4 );
This snippet skips any product that is:
- Virtual
- Downloadable
- An external/affiliate product
Picked Percentage Accuracy
When you exclude items using this hook, the Pick List plugin automatically adjusts the total item count used to calculate pick progress — so your pick percentage stays accurate.
Tip
You can extend this hook to exclude products by:
- Category or tag
- Specific product IDs
- Custom meta fields
Example:
if ( has_term( 'gift-cards', 'product_cat', $product->get_id() ) ) {
return false;
}