Add Mercado Pago as default fallback payment gateway (https://github.com/woocommerce/woocommerce-admin/pull/7043)
* Add paystack to fallback payment gateways * Add mercado page to fallback gateways * Move help text above submit button * Add changelog entry * Update gateway ID
This commit is contained in:
parent
d03dbeeead
commit
f09b06223c
|
@ -21,7 +21,7 @@ export const PaymentConnect = ( {
|
|||
const {
|
||||
key,
|
||||
oauth_connection_url: oAuthConnectionUrl,
|
||||
setup_help_text: helpText,
|
||||
setup_help_text: setupHelpText,
|
||||
required_settings_keys: settingKeys,
|
||||
settings,
|
||||
settings_url: settingsUrl,
|
||||
|
@ -99,6 +99,9 @@ export const PaymentConnect = ( {
|
|||
return errors;
|
||||
};
|
||||
|
||||
const helpText = setupHelpText && (
|
||||
<p dangerouslySetInnerHTML={ sanitizeHTML( setupHelpText ) } />
|
||||
);
|
||||
const DefaultForm = ( props ) => (
|
||||
<DynamicForm
|
||||
fields={ fields }
|
||||
|
@ -127,12 +130,10 @@ export const PaymentConnect = ( {
|
|||
if ( oAuthConnectionUrl ) {
|
||||
return (
|
||||
<>
|
||||
{ helpText }
|
||||
<Button isPrimary href={ oAuthConnectionUrl }>
|
||||
{ __( 'Connect', 'woocommerce-admin' ) }
|
||||
</Button>
|
||||
{ helpText && (
|
||||
<p dangerouslySetInnerHTML={ sanitizeHTML( helpText ) } />
|
||||
) }
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@ -140,17 +141,18 @@ export const PaymentConnect = ( {
|
|||
if ( fields.length ) {
|
||||
return (
|
||||
<>
|
||||
{ helpText }
|
||||
<DefaultForm />
|
||||
{ helpText && (
|
||||
<p dangerouslySetInnerHTML={ sanitizeHTML( helpText ) } />
|
||||
) }
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Button isPrimary href={ settingsUrl }>
|
||||
{ __( 'Manage', 'woocommerce-admin' ) }
|
||||
</Button>
|
||||
<>
|
||||
{ helpText }
|
||||
<Button isPrimary href={ settingsUrl }>
|
||||
{ __( 'Manage', 'woocommerce-admin' ) }
|
||||
</Button>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -85,6 +85,7 @@ Release and roadmap notes are available on the [WooCommerce Developers Blog](htt
|
|||
- Add: Note date range logic for GivingFeedback, and InsightFirstSale note. #6969
|
||||
- Add: Add transient notices feature #6809
|
||||
- Add: Add transformers in remote inbox notifications #6948
|
||||
- Add: Add Mercado Pago as default fallback payment gateway #7043
|
||||
- Add: Get post install scripts from gateway and enqueue in client #6967
|
||||
- Add: Free extension list powered by remote config #6952
|
||||
- Add: Add PayPal to fallback payment gateways #7001
|
||||
|
|
|
@ -68,6 +68,16 @@ class DefaultPaymentGateways {
|
|||
self::get_rules_for_cbd( false ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'key' => 'woo-mercado-pago-custom',
|
||||
'title' => __( 'Mercado Pago Checkout Pro & Custom', 'woocommerce-admin' ),
|
||||
'content' => __( 'Accept credit and debit cards, offline (cash or bank transfer) and logged-in payments with money in Mercado Pago. Safe and secure payments with the leading payment processor in LATAM.', 'woocommerce-admin' ),
|
||||
'image' => plugins_url( 'images/onboarding/mercadopago.png', WC_ADMIN_PLUGIN_FILE ),
|
||||
'plugins' => array( 'woocommerce-mercadopago' ),
|
||||
'is_visible' => array(
|
||||
self::get_rules_for_countries( array( 'AR', 'BR', 'CL', 'CO', 'MX', 'PE', 'UY' ) ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'key' => 'ppcp-gateway',
|
||||
'title' => __( 'PayPal Payments', 'woocommerce-admin' ),
|
||||
|
|
Loading…
Reference in New Issue