function commerce_registration_can_be_waitlisted in Commerce Registration 7
Condition callback.
Checks if the line item product can be put on a waitlist.
Related topics
1 string reference to 'commerce_registration_can_be_waitlisted'
File
- ./
commerce_registration.rules.inc, line 347 - Commerce Registration rules file.
Code
function commerce_registration_can_be_waitlisted($line_item) {
$line_item_wrapper = entity_metadata_wrapper('commerce_line_item', $line_item);
$info = array(
'id' => $line_item_wrapper->commerce_product->product_id
->value(),
'type' => 'commerce_product',
'bundle' => $line_item_wrapper->commerce_product->type
->value(),
);
$settings = registration_entity_settings($info);
return !empty($settings) && isset($settings['settings']) ? $settings['settings']['waitlist'] : FALSE;
}