1

I have two radio options in my form for payment: the first says 'credit card' and the second says 'cheque' (I'm using the PayPal wpp and Cheque modules). The Cheque option is easy enough to change to say something else ('send me an invoice') and I changed that in the store > config > cheque settings.

But, does anyone know how or where to change the text for the 'Credit Card' option. I want to add more information about how we process it to the label itself.

1 Answer 1

3

Alter the form that has the form_id of commerce_checkout_form_review:

/**
 * Implements hook_form_alter().
 */
function MYMODULE_form_commerce_checkout_form_review_alter(&$form, &$form_state) {
 $form['commerce_payment']['payment_method']['#options']['commerce_payment_example|commerce_payment_commerce_payment_example'] = t('AWESOME PAYMENT');
}

The #options array will hold a list of payment methods that are keyed by the payment_method followed by a pipe (|) and then an instance_id. Just update the title accordingly.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.