From fb1314a2b5591981aa6fe963fd0afaf03ac97ac3 Mon Sep 17 00:00:00 2001 From: David Beniamine Date: Thu, 2 Jan 2025 14:41:24 +0100 Subject: [PATCH] Fix using from paramas and bad hook placement --- htdocs/core/modules/dons/mod_don_terre.php | 2 +- htdocs/public/payment/paymentok.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/dons/mod_don_terre.php b/htdocs/core/modules/dons/mod_don_terre.php index 4792f288461e4..7fac069f192e7 100644 --- a/htdocs/core/modules/dons/mod_don_terre.php +++ b/htdocs/core/modules/dons/mod_don_terre.php @@ -78,11 +78,11 @@ public function __construct() /** * Returns the description of the numbering model * + * @param Translate $langs Object langs * @return string Texte descripif */ public function info($langs) { - global $langs; $langs->load("bills"); return $langs->trans('TerreNumRefModelDesc1', $this->prefixdon, $this->prefixcreditnote, $this->prefixdeposit); } diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index de2ffa25afc89..6b4ba41da1c9a 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -903,7 +903,6 @@ $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; } - $hookmanager->executeHooks('getBankAccountForPayements', $parameters, $bankaccountid, $action); if ($bankaccountid > 0) { $label = '(CustomerInvoicePayment)'; if ($object->type == Facture::TYPE_CREDIT_NOTE) { @@ -1152,6 +1151,7 @@ $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; } + $hookmanager->executeHooks('getBankAccountForPayements', $parameters, $bankaccountid, $action); if ($bankaccountid > 0) { $label = '(DonationPayment)'; $result = $paiement->addPaymentToBank($user, 'payment_donation', $label, $bankaccountid, '', '');