You are here

function commerce_payment_token_info_alter in Commerce Core 7

Implements hook_token_info_alter().

File

modules/payment/commerce_payment.tokens.inc, line 108
Builds placeholder replacement tokens for payment-related data.

Code

function commerce_payment_token_info_alter(&$data) {
  if (module_exists('commerce_checkout')) {
    $data['tokens']['commerce-order']['payment-method'] = array(
      'name' => t('Payment method'),
      'description' => t('The method_id of the payment method selected by the customer during checkout.'),
    );
    $data['tokens']['commerce-order']['payment-method-title'] = array(
      'name' => t('Payment method title'),
      'description' => t('The administrative title of the payment method selected by the customer during checkout.'),
    );
    $data['tokens']['commerce-order']['payment-method-short-title'] = array(
      'name' => t('Payment method short title'),
      'description' => t('The customer oriented short title of the payment method selected by the customer during checkout.'),
    );
    $data['tokens']['commerce-order']['payment-method-display-title'] = array(
      'name' => t('Payment method display title'),
      'description' => t('The checkout form oriented display title of the payment method for the payment transaction.'),
    );
  }
}