Commit 09efd7acdca for woocommerce

commit 09efd7acdca2cbab45dd408b6f21b087663f6706
Author: Vlad Olaru <vlad.olaru@automattic.com>
Date:   Mon Sep 28 23:09:28 2026 +0300

    Keep KOMOJU gateway titles on the Payments settings page (#69159)

    * Keep KOMOJU gateway titles on the Payments settings page

    KOMOJU became a recommended payment extension in 11.1. Its extension
    registers a legacy gateway plus one gateway per payment method, but the
    Payments settings page replaced every installed gateway's title and
    description with the suggestion's copy. All KOMOJU rows read "KOMOJU
    Payments" with the same description, and the legacy gateway's
    deprecation notice was hidden.

    Add KOMOJU to the list of suggestions whose gateways keep their own
    title and description, as done for other multi-gateway extensions. This
    is the minimal fix for the 11.2 release; the list itself is being
    reconsidered separately.

    * Add changelog entry for KOMOJU gateway titles fix

diff --git a/plugins/woocommerce/changelog/wooplug-7753-keep-komoju-gateway-copy b/plugins/woocommerce/changelog/wooplug-7753-keep-komoju-gateway-copy
new file mode 100644
index 00000000000..34df6374617
--- /dev/null
+++ b/plugins/woocommerce/changelog/wooplug-7753-keep-komoju-gateway-copy
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Show each KOMOJU payment method's own name and description on the Payments settings page, instead of identical rows.
diff --git a/plugins/woocommerce/src/Internal/Admin/Settings/PaymentsProviders.php b/plugins/woocommerce/src/Internal/Admin/Settings/PaymentsProviders.php
index c779f4e1d11..ef6cd703876 100644
--- a/plugins/woocommerce/src/Internal/Admin/Settings/PaymentsProviders.php
+++ b/plugins/woocommerce/src/Internal/Admin/Settings/PaymentsProviders.php
@@ -1388,6 +1388,7 @@ class PaymentsProviders {
 					ExtensionSuggestions::SQUARE,
 					ExtensionSuggestions::PAYONEER,
 					ExtensionSuggestions::AIRWALLEX,
+					ExtensionSuggestions::KOMOJU,
 					ExtensionSuggestions::COINBASE,         // We don't have suggestion details yet.
 					ExtensionSuggestions::AUTHORIZE_NET,    // We don't have suggestion details yet.
 					ExtensionSuggestions::BOLT,             // We don't have suggestion details yet.
diff --git a/plugins/woocommerce/tests/php/src/Internal/Admin/Settings/PaymentsProvidersTest.php b/plugins/woocommerce/tests/php/src/Internal/Admin/Settings/PaymentsProvidersTest.php
index a1b6cbd5cdc..65211b0e60c 100644
--- a/plugins/woocommerce/tests/php/src/Internal/Admin/Settings/PaymentsProvidersTest.php
+++ b/plugins/woocommerce/tests/php/src/Internal/Admin/Settings/PaymentsProvidersTest.php
@@ -1308,6 +1308,70 @@ class PaymentsProvidersTest extends WC_Unit_Test_Case {
 		$this->assertSame( ExtensionSuggestions::PAYPAL_FULL_STACK, $gateway_details['_suggestion_id'], 'Suggestion ID should match' );
 	}

+	/**
+	 * Test that get_payment_gateway_details keeps each KOMOJU gateway's own title and description.
+	 *
+	 * KOMOJU registers a legacy gateway plus one gateway per payment method. Overriding them with the
+	 * suggestion details would make all the rows identical and hide the legacy gateway's deprecation notice.
+	 */
+	public function test_get_payment_gateway_details_does_not_override_komoju_gateway_titles() {
+		// Arrange.
+		$plugin_slug     = 'komoju-japanese-payments';
+		$legacy_gateway  = new FakePaymentGateway(
+			'komoju',
+			array(
+				'enabled'            => false,
+				'method_title'       => 'KOMOJU',
+				'method_description' => 'Deprecated — will be removed in a future version.',
+				'plugin_slug'        => $plugin_slug,
+				'plugin_file'        => 'komoju-japanese-payments/index.php',
+			),
+		);
+		$konbini_gateway = new FakePaymentGateway(
+			'komoju_konbini',
+			array(
+				'enabled'            => true,
+				'method_title'       => 'KOMOJU - Konbini',
+				'method_description' => 'Konbini payments powered by KOMOJU',
+				'plugin_slug'        => $plugin_slug,
+				'plugin_file'        => 'komoju-japanese-payments/index.php',
+			),
+		);
+
+		$suggestion = array(
+			'id'          => ExtensionSuggestions::KOMOJU,
+			'_priority'   => 1,
+			'_type'       => ExtensionSuggestions::TYPE_PSP,
+			'title'       => 'KOMOJU Payments',
+			'description' => 'Easily add popular Japanese payment methods.',
+			'plugin'      => array(
+				'_type' => ExtensionSuggestions::PLUGIN_TYPE_WPORG,
+				'slug'  => $plugin_slug,
+			),
+			'icon'        => 'http://example.com/komoju-icon.png',
+		);
+
+		$this->mock_extension_suggestions
+			->expects( $this->exactly( 2 ) )
+			->method( 'get_by_plugin_slug' )
+			->with( $plugin_slug )
+			->willReturn( $suggestion );
+
+		// Act.
+		$legacy_details  = $this->sut->get_payment_gateway_details( $legacy_gateway, 0, 'JP' );
+		$konbini_details = $this->sut->get_payment_gateway_details( $konbini_gateway, 1, 'JP' );
+
+		// Assert.
+		$this->assertSame( 'KOMOJU', $legacy_details['title'], 'The legacy gateway should keep its own title' );
+		$this->assertSame( 'Deprecated — will be removed in a future version.', $legacy_details['description'], 'The legacy gateway should keep its deprecation notice' );
+		$this->assertSame( 'KOMOJU - Konbini', $konbini_details['title'], 'The payment method gateway should keep its own title' );
+		$this->assertSame( 'Konbini payments powered by KOMOJU', $konbini_details['description'], 'The payment method gateway should keep its own description' );
+
+		// Other suggestion details still apply.
+		$this->assertSame( 'http://example.com/komoju-icon.png', $konbini_details['icon'], 'Icon should be filled from suggestion' );
+		$this->assertSame( ExtensionSuggestions::KOMOJU, $konbini_details['_suggestion_id'], 'Suggestion ID should match' );
+	}
+
 	/**
 	 * Test that get_payment_gateway_details skips suggestion matching for offline payment methods.
 	 *