Update the mercado option name, so it enables correctly (https://github.com/woocommerce/woocommerce-admin/pull/6677)

* Update the mercado option name, so it enables correctly

* Add changelog
This commit is contained in:
louwie17 2021-03-25 18:01:37 -03:00 committed by GitHub
parent d5800c1a7a
commit e4a161fa44
5 changed files with 13 additions and 6 deletions

View File

@ -416,7 +416,7 @@ export default compose(
'woocommerce_mollie_payments_settings', 'woocommerce_mollie_payments_settings',
'woocommerce_payubiz_settings', 'woocommerce_payubiz_settings',
'woocommerce_paystack_settings', 'woocommerce_paystack_settings',
'woocommerce_mercadopago_settings', 'woocommerce_woo-mercado-pago-basic_settings',
]; ];
const options = optionNames.reduce( ( result, name ) => { const options = optionNames.reduce( ( result, name ) => {

View File

@ -236,8 +236,11 @@ export function getPaymentMethods( {
plugins: [ MERCADOPAGO_PLUGIN ], plugins: [ MERCADOPAGO_PLUGIN ],
container: <MercadoPago />, container: <MercadoPago />,
isConfigured: activePlugins.includes( MERCADOPAGO_PLUGIN ), isConfigured: activePlugins.includes( MERCADOPAGO_PLUGIN ),
isEnabled: enabledPaymentGateways.includes( 'mercadopago' ), isEnabled:
optionName: 'woocommerce_mercadopago_settings', options[ 'woocommerce_woo-mercado-pago-basic_settings' ] &&
options[ 'woocommerce_woo-mercado-pago-basic_settings' ]
.enabled === 'yes',
optionName: 'woocommerce_woo-mercado-pago-basic_settings',
}, },
{ {
key: 'paypal', key: 'paypal',

View File

@ -167,8 +167,11 @@ describe( 'TaskList > Payments', () => {
it( 'Detects whether the plugin is enabled based on the received options', () => { it( 'Detects whether the plugin is enabled based on the received options', () => {
const mercadoPagoParams = { const mercadoPagoParams = {
...params, ...params,
onboardingStatus: { options: {
enabledPaymentGateways: [ 'mercadopago' ], ...params.options,
'woocommerce_woo-mercado-pago-basic_settings': {
enabled: 'yes',
},
}, },
}; };

View File

@ -139,6 +139,7 @@ Release and roadmap notes are available on the [WooCommerce Developers Blog](htt
- Dev: Payments task: include Mercado Pago #6572 - Dev: Payments task: include Mercado Pago #6572
- Dev: Ensure script asset.php files are included in builds #6635 - Dev: Ensure script asset.php files are included in builds #6635
- Fix: Adding New Zealand and Ireland to selective bundle option, previously missed. #6649 - Fix: Adding New Zealand and Ireland to selective bundle option, previously missed. #6649
- Fix: Update the Mercado option used for enabling/disabling. #6677
== 2.1.3 3/14/2021 == == 2.1.3 3/14/2021 ==

View File

@ -703,7 +703,7 @@ class Onboarding {
$options[] = 'woocommerce_task_list_tracked_completed_tasks'; $options[] = 'woocommerce_task_list_tracked_completed_tasks';
$options[] = 'woocommerce_task_list_dismissed_tasks'; $options[] = 'woocommerce_task_list_dismissed_tasks';
$options[] = 'woocommerce_allow_tracking'; $options[] = 'woocommerce_allow_tracking';
$options[] = 'woocommerce_mercadopago_settings'; $options[] = 'woocommerce_woo-mercado-pago-basic_settings';
$options[] = 'woocommerce_stripe_settings'; $options[] = 'woocommerce_stripe_settings';
$options[] = 'woocommerce-ppcp-settings'; $options[] = 'woocommerce-ppcp-settings';
$options[] = 'woocommerce_ppcp-gateway_settings'; $options[] = 'woocommerce_ppcp-gateway_settings';