mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Refactor GooglePay availability notices.
This commit is contained in:
parent
dc77deea79
commit
b16e2571b1
3 changed files with 132 additions and 61 deletions
|
@ -16,6 +16,7 @@ use WooCommerce\PayPalCommerce\Googlepay\Assets\BlocksPaymentMethod;
|
|||
use WooCommerce\PayPalCommerce\Googlepay\Assets\Button;
|
||||
use WooCommerce\PayPalCommerce\Googlepay\Helper\ApmApplies;
|
||||
use WooCommerce\PayPalCommerce\Googlepay\Helper\ApmProductStatus;
|
||||
use WooCommerce\PayPalCommerce\Googlepay\Helper\AvailabilityNotice;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
|
||||
|
||||
return array(
|
||||
|
@ -49,6 +50,12 @@ return array(
|
|||
return true;
|
||||
},
|
||||
|
||||
'googlepay.availability_notice' => static function ( ContainerInterface $container ): AvailabilityNotice {
|
||||
return new AvailabilityNotice(
|
||||
$container->get( 'googlepay.helpers.apm-product-status' )
|
||||
);
|
||||
},
|
||||
|
||||
'googlepay.helpers.apm-product-status' => SingletonDecorator::make(
|
||||
static function( ContainerInterface $container ): ApmProductStatus {
|
||||
return new ApmProductStatus(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue