How to change text on Drupal WorldPay button? I'm using the Drupal WorldPay module (for Commerce 7.x-1.11).

On the checkout page it says "Pay via WorldPay". I want to change this. I've traced it back to a line in the module:

function commerce_worldpay_bg_commerce_payment_method_info() {
  $payment_methods = array();

  $payment_methods['commerce_worldpay_bg'] = array(
     'title' => t('Payment via Worldpay'),
     'description' => t('Integration with Worldpay\'s Business Gateway method.'),
     'active' => TRUE,
     'offsite' => TRUE,
     'offsite_autoredirect' => TRUE,
     'callbacks' => array(),
   );

  return $payment_methods;
}

Specifically:

'title' => t('Payment via Worldpay'),

I think I can override this in the theme template.php but have no idea how, and there seems to be very few instructions on how one might go about it.
In this specific case, you can implement hook_commerce_payment_method_info_alter(&amp;$payment_methods) in a custom module, and alter $payment_methods['commerce_worldpay_bg']['title'].

If you see other instances of the strings, which aren't changed, then you can use the String Overrides module, as already suggested, or use the $conf global variable in settings.php as follows.

$conf['locale_custom_strings_en'][''] = array(
  'Payment via Worldpay' =&gt; 'Your string',
);


Keep in mind that the latter two methods change the string wherever it is used; they don't provide a context to understand where the string is being used. This could be something you want, or not.