mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Enable OXXO/Credit Card button and add OXXO contact message
This commit is contained in:
parent
c53ce3f434
commit
31f91cd976
4 changed files with 3 additions and 19 deletions
|
@ -1920,10 +1920,6 @@ return array(
|
|||
$fields['disable_cards']['options'] = $card_options;
|
||||
$fields['card_icons']['options'] = array_merge( $dark_versions, $card_options );
|
||||
|
||||
if ( defined( 'PPCP_FLAG_SEPARATE_APM_BUTTONS' ) && PPCP_FLAG_SEPARATE_APM_BUTTONS === false ) {
|
||||
unset( $fields['allow_card_button_gateway'] );
|
||||
}
|
||||
|
||||
return $fields;
|
||||
},
|
||||
|
||||
|
@ -2199,10 +2195,6 @@ return array(
|
|||
return $container->get( 'api.shop.is-latin-america' );
|
||||
},
|
||||
'wcgateway.settings.allow_card_button_gateway' => static function ( ContainerInterface $container ): bool {
|
||||
if ( defined( 'PPCP_FLAG_SEPARATE_APM_BUTTONS' ) && PPCP_FLAG_SEPARATE_APM_BUTTONS === false ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
assert( $settings instanceof ContainerInterface );
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ class OXXOGateway extends WC_Payment_Gateway {
|
|||
$this->id = self::ID;
|
||||
|
||||
$this->method_title = __( 'OXXO', 'woocommerce-paypal-payments' );
|
||||
$this->method_description = __( 'OXXO is a Mexican chain of convenience stores.', 'woocommerce-paypal-payments' );
|
||||
$this->method_description = __( 'OXXO is a Mexican chain of convenience stores.<br />*Get PayPal account permission to use OXXO payment functionality by contacting us at (+52) 800-925-0304', 'woocommerce-paypal-payments' );
|
||||
|
||||
$this->title = $this->get_option( 'title', $this->method_title );
|
||||
$this->description = $this->get_option( 'description', __( 'OXXO allows you to pay bills and online purchases in-store with cash.', 'woocommerce-paypal-payments' ) );
|
||||
|
|
|
@ -243,9 +243,7 @@ class WCGatewayModule implements ModuleInterface {
|
|||
( $c->get( 'wcgateway.pay-upon-invoice' ) )->init();
|
||||
}
|
||||
|
||||
if ( defined( 'PPCP_FLAG_OXXO' ) && PPCP_FLAG_OXXO === true ) {
|
||||
( $c->get( 'wcgateway.oxxo' ) )->init();
|
||||
}
|
||||
( $c->get( 'wcgateway.oxxo' ) )->init();
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -279,10 +277,6 @@ class WCGatewayModule implements ModuleInterface {
|
|||
add_action(
|
||||
'wc_ajax_ppc-oxxo',
|
||||
static function () use ( $c ) {
|
||||
if ( defined( 'PPCP_FLAG_OXXO' ) && PPCP_FLAG_OXXO === false ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$endpoint = $c->get( 'wcgateway.endpoint.oxxo' );
|
||||
$endpoint->handle_request();
|
||||
}
|
||||
|
@ -355,7 +349,7 @@ class WCGatewayModule implements ModuleInterface {
|
|||
$methods[] = $container->get( 'wcgateway.pay-upon-invoice-gateway' );
|
||||
}
|
||||
|
||||
if ( defined( 'PPCP_FLAG_OXXO' ) && PPCP_FLAG_OXXO === true && 'MX' === $shop_country ) {
|
||||
if ( 'MX' === $shop_country ) {
|
||||
$methods[] = $container->get( 'wcgateway.oxxo-gateway' );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue