function commerce_gc_product_line_item_is_giftcard in Commerce GC 7
Determine whether a line item wrapper qualifies as a giftcard
Parameters
EntityDrupalWrapper $line_item_wrapper:
Return value
boolean
3 calls to commerce_gc_product_line_item_is_giftcard()
- commerce_gc_product_commerce_checkout_complete in modules/
commerce_gc_product/ commerce_gc_product.module - commerce_gc_product_pane_review in modules/
commerce_gc_product/ includes/ commerce_gc_product.checkout_pane.inc - commerce_gc_product_submit_order_form_giftcard_purchases in modules/
commerce_gc_product/ commerce_gc_product.module
File
- modules/
commerce_gc_product/ commerce_gc_product.module, line 224 - Provides Giftcard product type and support.
Code
function commerce_gc_product_line_item_is_giftcard(EntityDrupalWrapper $line_item_wrapper) {
$types = commerce_gc_product_giftcard_line_item_types();
return in_array($line_item_wrapper->type
->value(), $types);
}