You are here

function commerce_webform_rules_condition_info in Commerce Webform 7

Same name and namespace in other branches
  1. 8 commerce_webform.rules.inc \commerce_webform_rules_condition_info()
  2. 7.2 commerce_webform.rules.inc \commerce_webform_rules_condition_info()

Implements hook_rules_condition_info().

File

./commerce_webform.rules.inc, line 11
Rules extras supplied by the commerce webform module.

Code

function commerce_webform_rules_condition_info() {
  return array(
    'commerce_webform_is_commerce_webform' => array(
      'label' => t('Webform is a commerce webform.'),
      'parameter' => array(
        'webform' => array(
          'type' => 'node',
          'label' => t('The submitted webform node'),
        ),
      ),
      'help' => t('This condition returns TRUE if the submitted webform has a commerce webform field.'),
      'group' => t('Commerce Webform'),
    ),
    'commerce_webform_is_commerce_webform_order' => array(
      'label' => t('Order contains items from a commerce webform.'),
      'parameter' => array(
        'commerce_order' => array(
          'type' => 'commerce_order',
          'label' => t('A commerce order'),
        ),
      ),
      'help' => t('This condition returns TRUE if the order contains products from a commerce webform.'),
      'group' => t('Commerce Webform'),
    ),
    'commerce_webform_is_specific_commerce_webform_order' => array(
      'label' => t('Order contains items from a specific commerce webform.'),
      'parameter' => array(
        'commerce_order' => array(
          'type' => 'commerce_order',
          'label' => t('A commerce order'),
        ),
        'webform' => array(
          'type' => 'node',
          'label' => t('A webform node'),
        ),
      ),
      'help' => t('This condition returns TRUE if the order contains products from a specific commerce webform.'),
      'group' => t('Commerce Webform'),
    ),
  );
}