function commerce_checkout_completion_message_default in Commerce Core 7
Returns the default value for the checkout completion message settings form.
3 calls to commerce_checkout_completion_message_default()
- commerce_checkout_completion_message_pane_checkout_form in modules/
checkout/ includes/ commerce_checkout.checkout_pane.inc - Checkout pane callback: presents a completion message on the complete page.
- commerce_checkout_completion_message_pane_settings_form in modules/
checkout/ includes/ commerce_checkout.checkout_pane.inc - Checkout pane callback: returns the settings form elements for the checkout completion message.
- commerce_checkout_i18n_string_list in modules/
checkout/ commerce_checkout.module - Implements hook_i18n_string_list().
File
- modules/
checkout/ commerce_checkout.module, line 1031 - Enable checkout as a multi-step form with customizable pages and a simple checkout pane API.
Code
function commerce_checkout_completion_message_default() {
// If the Filtered HTML text format is available, use a default value with
// links in it.
if (filter_format_load('filtered_html')) {
$value = 'Your order number is [commerce-order:order-number]. You can <a href="[commerce-order:url]">view your order</a> on your account page when logged in.' . "\n\n" . '<a href="[site:url]">Return to the front page.</a>';
$format = 'filtered_html';
}
else {
// Otherwise select a fallback format and use a plain text default value.
$value = 'Your order number is [commerce-order:order-number]. You can view your order on your account page when logged in.';
$format = filter_fallback_format();
}
return array(
'value' => $value,
'format' => $format,
);
}