mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 16:24:33 +08:00
Merge branch 'PCP-1744-google-pay-integration' into wip/apple-google-combined
# Conflicts: # modules.php
This commit is contained in:
commit
2e7f9b46b0
36 changed files with 4240 additions and 7 deletions
|
@ -703,7 +703,6 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
|
||||
'disable_cards' => array(
|
||||
'title' => __( 'Disable specific credit cards', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-multiselect',
|
||||
|
@ -950,6 +949,13 @@ return array(
|
|||
'paylater' => _x( 'Pay Later', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
||||
);
|
||||
},
|
||||
|
||||
'wcgateway.extra-funding-sources' => static function( ContainerInterface $container ): array {
|
||||
return array(
|
||||
'googlepay' => _x( 'Google Pay', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* The sources that do not cause issues about redirecting (on mobile, ...) and sometimes not returning back.
|
||||
*/
|
||||
|
@ -1051,7 +1057,10 @@ return array(
|
|||
'wcgateway.funding-source.renderer' => function ( ContainerInterface $container ) : FundingSourceRenderer {
|
||||
return new FundingSourceRenderer(
|
||||
$container->get( 'wcgateway.settings' ),
|
||||
$container->get( 'wcgateway.all-funding-sources' )
|
||||
array_merge(
|
||||
$container->get( 'wcgateway.all-funding-sources' ),
|
||||
$container->get( 'wcgateway.extra-funding-sources' )
|
||||
)
|
||||
);
|
||||
},
|
||||
|
||||
|
|
|
@ -391,6 +391,7 @@ class SettingsListener {
|
|||
if ( self::CREDENTIALS_UNCHANGED !== $credentials_change_status ) {
|
||||
$this->settings->set( 'products_dcc_enabled', null );
|
||||
$this->settings->set( 'products_pui_enabled', null );
|
||||
do_action( 'woocommerce_paypal_payments_clear_apm_product_status', $this->settings );
|
||||
}
|
||||
|
||||
if ( in_array(
|
||||
|
|
|
@ -288,6 +288,7 @@ class WCGatewayModule implements ModuleInterface {
|
|||
$settings->set( 'products_dcc_enabled', false );
|
||||
$settings->set( 'products_pui_enabled', false );
|
||||
$settings->persist();
|
||||
do_action( 'woocommerce_paypal_payments_clear_apm_product_status', $settings );
|
||||
|
||||
// Update caches.
|
||||
$dcc_status = $c->get( 'wcgateway.helper.dcc-product-status' );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue