The reason for that is to change the title of a payment method. I'm sorry if it's there and did not find it. I know I can use string override but I don't want to install yet another module for such a simple issue.

function uc_payment_pack_payment_method() {
$methods[] = array(
'id' => 'check',
'name' => t('Check'),
'title' => t('Check or money order'), <-- change that
'desc' => t('Pay by mailing a check or money order.'),
'callback' => 'uc_payment_method_check',
'weight' => 1,
'checkout' => TRUE,
'no_gateway' => TRUE,
);

...

Comments

hles’s picture

Oh wow, i quoted instead of "coding", this issue will be a complete fail if furthermore the answer is "yes there is a hook for that" =)

longwave’s picture

Title: Is there a hook for altering a payment method? » Add hook for altering a payment method
Category: support » feature

No, there isn't one - hook_payment_gateway_alter() exists, but not hook_payment_method_alter(). It should be a one line patch (plus documentation) to get it added, though.

hles’s picture

Assigned: Unassigned » hles

I think I can try to make that patch.

hles’s picture

Status: Active » Needs review
StatusFileSize
new1.31 KB

Patch attached with doc

Status: Needs review » Needs work

The last submitted patch, add_hook_payment_method_alter-1366066.patch, failed testing.

longwave’s picture

Version: 6.x-2.7 » 6.x-2.x-dev
Status: Needs work » Needs review
longwave’s picture

longwave’s picture

Status: Needs review » Fixed

Committed to 6.x, ported and committed to 7.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.