Conditionally Exclude Orders from  Automatic Printing Software 3
The below article is for WooFood , Food Ordering Plugin for WordPress and WooCommerce. If you don't already have it . Please take a look on the product page

The following snippet will exclude orders including Products with type “Gift Card”

You can adjust the following snippet to your needs to conditionally change the orders to be included in software

add_filter("woofood_rest_include_order_in_software", "wpslash_exclude_order_from_software", 10, 2);
function wpslash_exclude_order_from_software($bool, $order_data)
	global $woocommerce;
	foreach ( $order_data["line_items"] as $line_item ) {
   $product_id = intval($line_item['product_id']);
 	$product = wc_get_product($product_id);
		if ($product->is_type('gift-card')) {
        	return false;

	return $bool;
The above article is for WooFood Food Delivery Plugin for WooCommerce