Skip to content

Commit bc55ae7

Browse files
committed
Consolidate iDEAL rebranding block
Move the iDEAL logo rebranding conditional to immediately after creating $payment_method_ideal so the name/images are set before adding the payment method, and remove the duplicated block later in the file. This ensures the iDEAL branding (effective 2026-01-29) is applied once and avoids redundant assignments.
1 parent bfb6e72 commit bc55ae7

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

src/Plugin.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,22 @@ public function register_payment_methods(): void {
843843
'woocommerce' => $image_service->get_path( 'other/ideal-wero/method-ideal-wero-wc-51x32.svg' ),
844844
];
845845

846+
/**
847+
* The iDEAL logo rebranding takes effect on January 29, 2026.
848+
*
849+
* @link https://ideal.nl/en/ideal-wero-branding
850+
*/
851+
if ( \time() < \strtotime( '2026-01-29 00:00:00' ) ) {
852+
$payment_method_ideal->name = \__( 'iDEAL', 'pronamic_ideal' );
853+
854+
$payment_method_ideal->images = [
855+
'640x360' => $image_service->get_path( 'methods/ideal/method-ideal-640x360.svg' ),
856+
'woocommerce' => $image_service->get_path( 'methods/ideal/method-ideal-wc-51x32.svg' ),
857+
];
858+
}
859+
860+
$this->payment_methods->add( $payment_method_ideal );
861+
846862
// Direct debit.
847863
$payment_method_direct_debit = new PaymentMethod( PaymentMethods::DIRECT_DEBIT );
848864

@@ -915,22 +931,6 @@ public function register_payment_methods(): void {
915931

916932
$this->payment_methods->add( $payment_method_gift_card );
917933

918-
/**
919-
* The iDEAL logo rebranding takes effect on January 29, 2026.
920-
*
921-
* @link https://ideal.nl/en/ideal-wero-branding
922-
*/
923-
if ( \time() < \strtotime( '2026-01-29 00:00:00' ) ) {
924-
$payment_method_ideal->name = \__( 'iDEAL', 'pronamic_ideal' );
925-
926-
$payment_method_ideal->images = [
927-
'640x360' => $image_service->get_path( 'methods/ideal/method-ideal-640x360.svg' ),
928-
'woocommerce' => $image_service->get_path( 'methods/ideal/method-ideal-wc-51x32.svg' ),
929-
];
930-
}
931-
932-
$this->payment_methods->add( $payment_method_ideal );
933-
934934
// IDEAL QR.
935935
$payment_method_ideal_qr = new PaymentMethod( PaymentMethods::IDEALQR );
936936

0 commit comments

Comments
 (0)