Commit fcb595bd4b8 for woocommerce
commit fcb595bd4b8dc965cdd9309bf916dbbfbdac0ab3
Author: Vlad Olaru <vlad.olaru@automattic.com>
Date: Tue May 19 11:54:58 2026 +0300
[Payments NOX] Re-add Mercado Pago as a recommended payment partner extension (#65118)
* update(payments-nox): re-add Mercado Pago to recommendations in 7 LATAM markets
WOOPRD-920 (WC 10.3, PR #61235) removed Mercado Pago from the NOX
recommendations for all 7 of its supported LATAM markets. A contract
amendment now obligates a premium NOX position for Mercado Pago in
those markets, so this restores it.
- In Argentina, Chile, Colombia, Peru, and Uruguay, Mercado Pago
becomes the preferred PSP, demoting Visa Acceptance Solutions
from the main list to "Other payment options".
- In Brazil and Mexico, Stripe stays as the preferred PSP and Mercado
Pago is placed as the first entry in "Other payment options" per
the agreed fallback for 10.8. Silu returns 2026-05-19 and may
request a Stripe -> Mercado Pago swap in a follow-up release.
Each country's Mercado Pago entry uses _merge_on_type to apply the
country-localized Pricing and Terms URLs (mercadopago.com.ar, .cl,
.co, .pe, .uy, .com.br, .com.mx), matching the pre-WOOPRD-920 pattern.
The Mercado Pago base extension entry in get_all_extensions_base_details()
is unchanged.
The country count fixtures in PaymentsExtensionSuggestionsTest bump
by +1 for each of the 7 markets in both data providers, and the MX
per-country merge test is updated to cover the new Mercado Pago
position and assert its country-specific links.
Refs WOOPRD-3539
* update(payments-nox): Annotate Mercado Pago URL overrides with upstream cross-reference
The Mercado Pago per-country `_merge_on_type` blocks added in
e31ee29da1 carried an inline comment pointing to the upstream
`\MercadoPago\Woocommerce\Helpers\Links` class, but the comment was
placed between the `links` array key and its first element. That
position annotates a single array element rather than the link
collection it actually describes, and it sits inside the literal
in a way no other per-country override does.
Lift the 7 cross-reference comments one level — above
`'links' => array(` — and reword them as a single sentence so the
guidepost to the upstream Mercado Pago WooCommerce extension reads
naturally and applies to the whole list of country-localized URLs.
Refs WOOPRD-3539
* update(payments-nox): Cover Mercado Pago placement assertions in NOX LATAM markets
After re-adding Mercado Pago across the 7 LATAM markets in
e31ee29da1, the test suite verifies the MX configuration in full
(ordering, `TAG_PREFERRED`, and country-localized link merging),
but for the other 6 markets only bumps the expected per-country
suggestion count. The 5 markets where Mercado Pago is the
*preferred* provider (AR, CL, CO, PE, UY) are the primary
contract obligation of the change, and Brazil has a distinct
"Stripe stays preferred, MP first in Other" arrangement; in both
cases a misconfiguration of `TAG_PREFERRED`, a typo in the
per-country URL TLD, or an ordering regression would still pass
a count-only assertion.
Add two new tests in `PaymentsExtensionSuggestionsTest`:
- A data-provider-driven test covering AR/CL/CO/PE/UY, asserting
Mercado Pago at index 0 with `TAG_PREFERRED`, Visa demoted
without `TAG_PREFERRED`, and the country-localized Spanish
pricing/terms URLs merged on top of the base ABOUT/DOCS/SUPPORT
links.
- A BR-specific test mirroring the existing MX pattern: Stripe at
index 0 with `TAG_PREFERRED`, Mercado Pago at index 1 without
it, and the Portuguese-localized `.com.br` URLs merged in.
Refs WOOPRD-3539
diff --git a/plugins/woocommerce/changelog/update-WOOPRD-3539-readd-mercadopago-to-nox b/plugins/woocommerce/changelog/update-WOOPRD-3539-readd-mercadopago-to-nox
new file mode 100644
index 00000000000..5848e8bc499
--- /dev/null
+++ b/plugins/woocommerce/changelog/update-WOOPRD-3539-readd-mercadopago-to-nox
@@ -0,0 +1,3 @@
+Significance: patch
+Type: update
+Comment: Re-add Mercado Pago as a recommended payment partner across 7 LATAM markets in the NOX onboarding flow.
diff --git a/plugins/woocommerce/src/Internal/Admin/Suggestions/PaymentsExtensionSuggestions.php b/plugins/woocommerce/src/Internal/Admin/Suggestions/PaymentsExtensionSuggestions.php
index fdc5eae4d75..6454243f07c 100644
--- a/plugins/woocommerce/src/Internal/Admin/Suggestions/PaymentsExtensionSuggestions.php
+++ b/plugins/woocommerce/src/Internal/Admin/Suggestions/PaymentsExtensionSuggestions.php
@@ -1330,12 +1330,26 @@ class PaymentsExtensionSuggestions {
self::HELIOPAY,
),
'AR' => array(
- self::VISA => array(
- '_append' => array(
+ self::MERCADO_PAGO => array(
+ '_append' => array(
'tags' => array( self::TAG_PREFERRED ),
),
+ '_merge_on_type' => array(
+ // These URLs come from the Mercado Pago for WooCommerce extension — see `\MercadoPago\Woocommerce\Helpers\Links`.
+ 'links' => array(
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_PRICING,
+ 'url' => 'https://www.mercadopago.com.ar/costs-section',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_TERMS,
+ 'url' => 'https://www.mercadopago.com.ar/ayuda/terminos-y-politicas_194',
+ ),
+ ),
+ ),
),
self::PAYPAL_FULL_STACK,
+ self::VISA,
self::PAYPAL_WALLET,
self::HELIOPAY,
),
@@ -1386,11 +1400,26 @@ class PaymentsExtensionSuggestions {
self::HELIOPAY,
),
'BR' => array(
- self::STRIPE => array(
+ self::STRIPE => array(
'_append' => array(
'tags' => array( self::TAG_PREFERRED ),
),
),
+ self::MERCADO_PAGO => array(
+ '_merge_on_type' => array(
+ // These URLs come from the Mercado Pago for WooCommerce extension — see `\MercadoPago\Woocommerce\Helpers\Links`.
+ 'links' => array(
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_PRICING,
+ 'url' => 'https://www.mercadopago.com.br/costs-section',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_TERMS,
+ 'url' => 'https://www.mercadopago.com.br/ajuda/termos-e-politicas_194',
+ ),
+ ),
+ ),
+ ),
self::PAYPAL_FULL_STACK,
self::VISA,
self::PAYPAL_WALLET,
@@ -1409,22 +1438,50 @@ class PaymentsExtensionSuggestions {
self::HELIOPAY,
),
'CL' => array(
- self::VISA => array(
- '_append' => array(
+ self::MERCADO_PAGO => array(
+ '_append' => array(
'tags' => array( self::TAG_PREFERRED ),
),
+ '_merge_on_type' => array(
+ // These URLs come from the Mercado Pago for WooCommerce extension — see `\MercadoPago\Woocommerce\Helpers\Links`.
+ 'links' => array(
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_PRICING,
+ 'url' => 'https://www.mercadopago.cl/costs-section',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_TERMS,
+ 'url' => 'https://www.mercadopago.cl/ayuda/terminos-y-politicas_194',
+ ),
+ ),
+ ),
),
self::PAYPAL_FULL_STACK,
+ self::VISA,
self::PAYPAL_WALLET,
self::HELIOPAY,
),
'CO' => array(
- self::VISA => array(
- '_append' => array(
+ self::MERCADO_PAGO => array(
+ '_append' => array(
'tags' => array( self::TAG_PREFERRED ),
),
+ '_merge_on_type' => array(
+ // These URLs come from the Mercado Pago for WooCommerce extension — see `\MercadoPago\Woocommerce\Helpers\Links`.
+ 'links' => array(
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_PRICING,
+ 'url' => 'https://www.mercadopago.com.co/costs-section',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_TERMS,
+ 'url' => 'https://www.mercadopago.com.co/ayuda/terminos-y-politicas_194',
+ ),
+ ),
+ ),
),
self::PAYPAL_FULL_STACK,
+ self::VISA,
self::PAYPAL_WALLET,
self::HELIOPAY,
),
@@ -1557,15 +1614,30 @@ class PaymentsExtensionSuggestions {
self::HELIOPAY,
),
'MX' => array(
- self::STRIPE => array(
+ self::STRIPE => array(
'_append' => array(
'tags' => array( self::TAG_PREFERRED ),
),
),
+ self::MERCADO_PAGO => array(
+ '_merge_on_type' => array(
+ // These URLs come from the Mercado Pago for WooCommerce extension — see `\MercadoPago\Woocommerce\Helpers\Links`.
+ 'links' => array(
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_PRICING,
+ 'url' => 'https://www.mercadopago.com.mx/costs-section',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_TERMS,
+ 'url' => 'https://www.mercadopago.com.mx/ayuda/terminos-y-politicas_194',
+ ),
+ ),
+ ),
+ ),
self::PAYPAL_FULL_STACK,
self::VISA,
self::PAYPAL_WALLET,
- self::KLARNA => array(
+ self::KLARNA => array(
'_merge_on_type' => array(
'links' => array(
array(
@@ -1611,12 +1683,26 @@ class PaymentsExtensionSuggestions {
self::HELIOPAY,
),
'PE' => array(
- self::VISA => array(
- '_append' => array(
+ self::MERCADO_PAGO => array(
+ '_append' => array(
'tags' => array( self::TAG_PREFERRED ),
),
+ '_merge_on_type' => array(
+ // These URLs come from the Mercado Pago for WooCommerce extension — see `\MercadoPago\Woocommerce\Helpers\Links`.
+ 'links' => array(
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_PRICING,
+ 'url' => 'https://www.mercadopago.com.pe/costs-section',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_TERMS,
+ 'url' => 'https://www.mercadopago.com.pe/ayuda/terminos-y-politicas_194',
+ ),
+ ),
+ ),
),
self::PAYPAL_FULL_STACK,
+ self::VISA,
self::PAYPAL_WALLET,
self::HELIOPAY,
),
@@ -1694,12 +1780,26 @@ class PaymentsExtensionSuggestions {
self::HELIOPAY,
),
'UY' => array(
- self::VISA => array(
- '_append' => array(
+ self::MERCADO_PAGO => array(
+ '_append' => array(
'tags' => array( self::TAG_PREFERRED ),
),
+ '_merge_on_type' => array(
+ // These URLs come from the Mercado Pago for WooCommerce extension — see `\MercadoPago\Woocommerce\Helpers\Links`.
+ 'links' => array(
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_PRICING,
+ 'url' => 'https://www.mercadopago.com.uy/costs-section',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_TERMS,
+ 'url' => 'https://www.mercadopago.com.uy/ayuda/terminos-y-politicas_194',
+ ),
+ ),
+ ),
),
self::PAYPAL_FULL_STACK,
+ self::VISA,
self::PAYPAL_WALLET,
self::HELIOPAY,
),
diff --git a/plugins/woocommerce/tests/php/src/Internal/Admin/Suggestions/PaymentsExtensionSuggestionsTest.php b/plugins/woocommerce/tests/php/src/Internal/Admin/Suggestions/PaymentsExtensionSuggestionsTest.php
index 512ec86f4ff..460f6c3f462 100644
--- a/plugins/woocommerce/tests/php/src/Internal/Admin/Suggestions/PaymentsExtensionSuggestionsTest.php
+++ b/plugins/woocommerce/tests/php/src/Internal/Admin/Suggestions/PaymentsExtensionSuggestionsTest.php
@@ -165,7 +165,7 @@ class PaymentsExtensionSuggestionsTest extends WC_Unit_Test_Case {
'CH' => 8,
'AG' => 5,
'AI' => 3,
- 'AR' => 4,
+ 'AR' => 5,
'AW' => 3,
'BS' => 5,
'BB' => 5,
@@ -173,11 +173,11 @@ class PaymentsExtensionSuggestionsTest extends WC_Unit_Test_Case {
'BM' => 5,
'BO' => 2,
'BQ' => 3,
- 'BR' => 5,
+ 'BR' => 6,
'VG' => 3,
'KY' => 5,
- 'CL' => 4,
- 'CO' => 4,
+ 'CL' => 5,
+ 'CO' => 5,
'CR' => 5,
'CW' => 3,
'DM' => 5,
@@ -193,11 +193,11 @@ class PaymentsExtensionSuggestionsTest extends WC_Unit_Test_Case {
'HN' => 5,
'JM' => 5,
'MQ' => 4,
- 'MX' => 6,
+ 'MX' => 7,
'NI' => 5,
'PA' => 5,
'PY' => 2,
- 'PE' => 4,
+ 'PE' => 5,
'KN' => 5,
'LC' => 5,
'SX' => 3,
@@ -205,7 +205,7 @@ class PaymentsExtensionSuggestionsTest extends WC_Unit_Test_Case {
'SR' => 3,
'TT' => 5,
'TC' => 5,
- 'UY' => 4,
+ 'UY' => 5,
'VI' => 3,
'VE' => 3,
'AU' => 12,
@@ -476,7 +476,7 @@ class PaymentsExtensionSuggestionsTest extends WC_Unit_Test_Case {
'CH' => 8,
'AG' => 5,
'AI' => 3,
- 'AR' => 4,
+ 'AR' => 5,
'AW' => 3,
'BS' => 5,
'BB' => 5,
@@ -484,11 +484,11 @@ class PaymentsExtensionSuggestionsTest extends WC_Unit_Test_Case {
'BM' => 5,
'BO' => 2,
'BQ' => 3,
- 'BR' => 5,
+ 'BR' => 6,
'VG' => 3,
'KY' => 5,
- 'CL' => 4,
- 'CO' => 4,
+ 'CL' => 5,
+ 'CO' => 5,
'CR' => 5,
'CW' => 3,
'DM' => 5,
@@ -504,11 +504,11 @@ class PaymentsExtensionSuggestionsTest extends WC_Unit_Test_Case {
'HN' => 5,
'JM' => 5,
'MQ' => 4,
- 'MX' => 6,
+ 'MX' => 7,
'NI' => 5,
'PA' => 5,
'PY' => 2,
- 'PE' => 4,
+ 'PE' => 5,
'KN' => 5,
'LC' => 5,
'SX' => 3,
@@ -516,7 +516,7 @@ class PaymentsExtensionSuggestionsTest extends WC_Unit_Test_Case {
'SR' => 3,
'TT' => 5,
'TC' => 5,
- 'UY' => 4,
+ 'UY' => 5,
'VI' => 3,
'VE' => 3,
'AU' => 12,
@@ -701,10 +701,11 @@ class PaymentsExtensionSuggestionsTest extends WC_Unit_Test_Case {
$extensions = $this->sut->get_country_extensions( 'MX' );
// Assert.
- $this->assertCount( 6, $extensions );
+ $this->assertCount( 7, $extensions );
$this->assertSame(
array(
PaymentsExtensionSuggestions::STRIPE,
+ PaymentsExtensionSuggestions::MERCADO_PAGO,
PaymentsExtensionSuggestions::PAYPAL_FULL_STACK,
PaymentsExtensionSuggestions::VISA,
PaymentsExtensionSuggestions::PAYPAL_WALLET,
@@ -718,7 +719,37 @@ class PaymentsExtensionSuggestionsTest extends WC_Unit_Test_Case {
// It should have the preferred tag.
$this->assertContains( PaymentsExtensionSuggestions::TAG_PREFERRED, $stripe['tags'] );
- $klarna = $extensions[4];
+ $mercado_pago = $extensions[1];
+ // The links should include the country-specific Mercado Pago URLs merged with the base details.
+ $this->assertEqualsCanonicalizing(
+ array(
+ // These are coming from the per-country details.
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_PRICING,
+ 'url' => 'https://www.mercadopago.com.mx/costs-section',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_TERMS,
+ 'url' => 'https://www.mercadopago.com.mx/ayuda/terminos-y-politicas_194',
+ ),
+ // These are base details for the suggestion.
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_ABOUT,
+ 'url' => 'https://woocommerce.com/products/mercado-pago-checkout/',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_DOCS,
+ 'url' => 'https://woocommerce.com/document/mercado-pago/',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_SUPPORT,
+ 'url' => 'https://woocommerce.com/my-account/contact-support/?select=mercado-pago-checkout',
+ ),
+ ),
+ $mercado_pago['links']
+ );
+
+ $klarna = $extensions[5];
// The links should be the expected ones.
$this->assertEqualsCanonicalizing(
array(
@@ -749,6 +780,149 @@ class PaymentsExtensionSuggestionsTest extends WC_Unit_Test_Case {
);
}
+ /**
+ * Test that Mercado Pago is the preferred provider, Visa is demoted, and the country-localized links are merged
+ * across the 5 LATAM markets where Mercado Pago has primary placement (AR, CL, CO, PE, UY).
+ *
+ * @dataProvider data_provider_mercado_pago_preferred_markets
+ *
+ * @param string $country_code ISO 3166-1 alpha-2 country code.
+ * @param string $mercadopago_tld TLD path for the country (e.g. `com.ar`, `cl`).
+ */
+ public function test_get_country_extensions_with_mercado_pago_as_preferred_provider( string $country_code, string $mercadopago_tld ) {
+ // Act.
+ $extensions = $this->sut->get_country_extensions( $country_code );
+
+ // Assert ordering: Mercado Pago first, Visa demoted into the "other payment options" group.
+ $this->assertSame(
+ array(
+ PaymentsExtensionSuggestions::MERCADO_PAGO,
+ PaymentsExtensionSuggestions::PAYPAL_FULL_STACK,
+ PaymentsExtensionSuggestions::VISA,
+ PaymentsExtensionSuggestions::PAYPAL_WALLET,
+ PaymentsExtensionSuggestions::HELIOPAY,
+ ),
+ array_column( $extensions, 'id' ),
+ "Mercado Pago should be the first suggestion in {$country_code}, with Visa demoted."
+ );
+
+ $mercado_pago = $extensions[0];
+ $this->assertContains(
+ PaymentsExtensionSuggestions::TAG_PREFERRED,
+ $mercado_pago['tags'],
+ "Mercado Pago should carry the preferred tag in {$country_code}."
+ );
+
+ $visa = $extensions[2];
+ $this->assertNotContains(
+ PaymentsExtensionSuggestions::TAG_PREFERRED,
+ $visa['tags'],
+ "Visa should not carry the preferred tag in {$country_code}."
+ );
+
+ // The country-localized PRICING/TERMS links should be merged on top of the base ABOUT/DOCS/SUPPORT links.
+ $this->assertEqualsCanonicalizing(
+ array(
+ // These are coming from the per-country details.
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_PRICING,
+ 'url' => "https://www.mercadopago.{$mercadopago_tld}/costs-section",
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_TERMS,
+ 'url' => "https://www.mercadopago.{$mercadopago_tld}/ayuda/terminos-y-politicas_194",
+ ),
+ // These are base details for the suggestion.
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_ABOUT,
+ 'url' => 'https://woocommerce.com/products/mercado-pago-checkout/',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_DOCS,
+ 'url' => 'https://woocommerce.com/document/mercado-pago/',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_SUPPORT,
+ 'url' => 'https://woocommerce.com/my-account/contact-support/?select=mercado-pago-checkout',
+ ),
+ ),
+ $mercado_pago['links']
+ );
+ }
+
+ /**
+ * Data provider for the markets where Mercado Pago is the preferred provider.
+ *
+ * @return array<string, array{string, string}>
+ */
+ public function data_provider_mercado_pago_preferred_markets(): array {
+ return array(
+ 'Argentina' => array( 'AR', 'com.ar' ),
+ 'Chile' => array( 'CL', 'cl' ),
+ 'Colombia' => array( 'CO', 'com.co' ),
+ 'Peru' => array( 'PE', 'com.pe' ),
+ 'Uruguay' => array( 'UY', 'com.uy' ),
+ );
+ }
+
+ /**
+ * Test that in Brazil, Stripe stays preferred and Mercado Pago is the first entry in "other payment options"
+ * with its Portuguese-localized links merged on top of the base details.
+ */
+ public function test_get_country_extensions_with_mercado_pago_in_other_options_for_br() {
+ // Act.
+ $extensions = $this->sut->get_country_extensions( 'BR' );
+
+ // Assert ordering: Stripe preferred, Mercado Pago at index 1.
+ $this->assertSame(
+ array(
+ PaymentsExtensionSuggestions::STRIPE,
+ PaymentsExtensionSuggestions::MERCADO_PAGO,
+ PaymentsExtensionSuggestions::PAYPAL_FULL_STACK,
+ PaymentsExtensionSuggestions::VISA,
+ PaymentsExtensionSuggestions::PAYPAL_WALLET,
+ PaymentsExtensionSuggestions::HELIOPAY,
+ ),
+ array_column( $extensions, 'id' )
+ );
+
+ $stripe = $extensions[0];
+ $this->assertContains( PaymentsExtensionSuggestions::TAG_PREFERRED, $stripe['tags'] );
+
+ // Mercado Pago should NOT carry the preferred tag in Brazil — Stripe stays primary per the 10.8 fallback.
+ $mercado_pago = $extensions[1];
+ $this->assertNotContains( PaymentsExtensionSuggestions::TAG_PREFERRED, $mercado_pago['tags'] );
+
+ // BR uses Portuguese paths (`ajuda/termos-e-politicas`) vs. Spanish (`ayuda/terminos-y-politicas`) in the other markets.
+ $this->assertEqualsCanonicalizing(
+ array(
+ // These are coming from the per-country details.
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_PRICING,
+ 'url' => 'https://www.mercadopago.com.br/costs-section',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_TERMS,
+ 'url' => 'https://www.mercadopago.com.br/ajuda/termos-e-politicas_194',
+ ),
+ // These are base details for the suggestion.
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_ABOUT,
+ 'url' => 'https://woocommerce.com/products/mercado-pago-checkout/',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_DOCS,
+ 'url' => 'https://woocommerce.com/document/mercado-pago/',
+ ),
+ array(
+ '_type' => PaymentsProviders::LINK_TYPE_SUPPORT,
+ 'url' => 'https://woocommerce.com/my-account/contact-support/?select=mercado-pago-checkout',
+ ),
+ ),
+ $mercado_pago['links']
+ );
+ }
+
/**
* Test getting payment extension suggestions by ID.
*/