Enable OXXO/Credit Card button and add OXXO contact message

This commit is contained in:
dinamiko 2022-11-02 12:27:03 +01:00
parent c53ce3f434
commit 31f91cd976
4 changed files with 3 additions and 19 deletions

View file

@ -1920,10 +1920,6 @@ return array(
$fields['disable_cards']['options'] = $card_options; $fields['disable_cards']['options'] = $card_options;
$fields['card_icons']['options'] = array_merge( $dark_versions, $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; return $fields;
}, },
@ -2199,10 +2195,6 @@ return array(
return $container->get( 'api.shop.is-latin-america' ); return $container->get( 'api.shop.is-latin-america' );
}, },
'wcgateway.settings.allow_card_button_gateway' => static function ( ContainerInterface $container ): bool { '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' ); $settings = $container->get( 'wcgateway.settings' );
assert( $settings instanceof ContainerInterface ); assert( $settings instanceof ContainerInterface );

View file

@ -77,7 +77,7 @@ class OXXOGateway extends WC_Payment_Gateway {
$this->id = self::ID; $this->id = self::ID;
$this->method_title = __( 'OXXO', 'woocommerce-paypal-payments' ); $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->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' ) ); $this->description = $this->get_option( 'description', __( 'OXXO allows you to pay bills and online purchases in-store with cash.', 'woocommerce-paypal-payments' ) );

View file

@ -243,9 +243,7 @@ class WCGatewayModule implements ModuleInterface {
( $c->get( 'wcgateway.pay-upon-invoice' ) )->init(); ( $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( add_action(
'wc_ajax_ppc-oxxo', 'wc_ajax_ppc-oxxo',
static function () use ( $c ) { static function () use ( $c ) {
if ( defined( 'PPCP_FLAG_OXXO' ) && PPCP_FLAG_OXXO === false ) {
return;
}
$endpoint = $c->get( 'wcgateway.endpoint.oxxo' ); $endpoint = $c->get( 'wcgateway.endpoint.oxxo' );
$endpoint->handle_request(); $endpoint->handle_request();
} }
@ -355,7 +349,7 @@ class WCGatewayModule implements ModuleInterface {
$methods[] = $container->get( 'wcgateway.pay-upon-invoice-gateway' ); $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' ); $methods[] = $container->get( 'wcgateway.oxxo-gateway' );
} }

View file

@ -26,8 +26,6 @@ define( 'PAYPAL_SANDBOX_API_URL', 'https://api.sandbox.paypal.com' );
define( 'PAYPAL_INTEGRATION_DATE', '2022-04-13' ); define( 'PAYPAL_INTEGRATION_DATE', '2022-04-13' );
define( 'PPCP_FLAG_SUBSCRIPTION', true ); define( 'PPCP_FLAG_SUBSCRIPTION', true );
define( 'PPCP_FLAG_OXXO', apply_filters( 'woocommerce_paypal_payments_enable_oxxo_feature', false ) );
define( 'PPCP_FLAG_SEPARATE_APM_BUTTONS', apply_filters( 'woocommerce_paypal_payments_enable_separate_apm_buttons_feature', false ) );
! defined( 'CONNECT_WOO_CLIENT_ID' ) && define( 'CONNECT_WOO_CLIENT_ID', 'AcCAsWta_JTL__OfpjspNyH7c1GGHH332fLwonA5CwX4Y10mhybRZmHLA0GdRbwKwjQIhpDQy0pluX_P' ); ! defined( 'CONNECT_WOO_CLIENT_ID' ) && define( 'CONNECT_WOO_CLIENT_ID', 'AcCAsWta_JTL__OfpjspNyH7c1GGHH332fLwonA5CwX4Y10mhybRZmHLA0GdRbwKwjQIhpDQy0pluX_P' );
! defined( 'CONNECT_WOO_SANDBOX_CLIENT_ID' ) && define( 'CONNECT_WOO_SANDBOX_CLIENT_ID', 'AYmOHbt1VHg-OZ_oihPdzKEVbU3qg0qXonBcAztuzniQRaKE0w1Hr762cSFwd4n8wxOl-TCWohEa0XM_' ); ! defined( 'CONNECT_WOO_SANDBOX_CLIENT_ID' ) && define( 'CONNECT_WOO_SANDBOX_CLIENT_ID', 'AYmOHbt1VHg-OZ_oihPdzKEVbU3qg0qXonBcAztuzniQRaKE0w1Hr762cSFwd4n8wxOl-TCWohEa0XM_' );