mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
Add GooglePay onboarding improvements.
This commit is contained in:
parent
bad21380b3
commit
b703f17bbf
7 changed files with 31 additions and 16 deletions
|
@ -16,6 +16,7 @@ use WooCommerce\PayPalCommerce\Vendor\Dhii\Container\ServiceProvider;
|
|||
use WooCommerce\PayPalCommerce\Vendor\Dhii\Modular\Module\ModuleInterface;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Interop\Container\ServiceProviderInterface;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
|
||||
|
||||
/**
|
||||
* Class GooglepayModule
|
||||
|
@ -77,10 +78,15 @@ class GooglepayModule implements ModuleInterface {
|
|||
// Clear product status handling.
|
||||
add_action(
|
||||
'woocommerce_paypal_payments_clear_apm_product_status',
|
||||
function() use ( $c ): void {
|
||||
function( Settings $settings = null ) use ( $c ): void {
|
||||
$apm_status = $c->get( 'googlepay.helpers.apm-product-status' );
|
||||
assert( $apm_status instanceof ApmProductStatus );
|
||||
$apm_status->clear();
|
||||
|
||||
if ( ! $settings instanceof Settings ) {
|
||||
$settings = null;
|
||||
}
|
||||
|
||||
$apm_status->clear( $settings );
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue