commerce_registration_defer.api.php in Commerce Registration 7.2
API documentation for commerce_registration_defer module.
File
modules/commerce_registration_defer/commerce_registration_defer.api.phpView source
<?php
/**
* @file
* API documentation for commerce_registration_defer module.
*/
/**
* Allow modules to react to a registration being deferred.
*
* This could be used, for example, to send the participant an email notifying
* them of the deferral.
*
* @param array $context
* array(
* 'original' => array(
* 'registration' => $original_registration,
* 'line item' => $original_line_item,
* ),
* 'new' => array(
* 'registration' => $new_registration,
* 'line item' => $line_item,
* ),
* 'order' => $order,
* );
*/
function hook_commerce_registration_defer($context) {
$message = 'Looks like you are all set up to take another course instead of this one. Which one you say... that one.';
// Send the email.
$params = array(
'subject' => t('Your registration has been deferred'),
'body' => check_markup(t($message), 'plain_text'),
);
drupal_mail('example', 'deferral', $context['original']['registration']->anon_mail, language_default(), $params);
}
Functions
Name![]() |
Description |
---|---|
hook_commerce_registration_defer | Allow modules to react to a registration being deferred. |