mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Allow GooglePay use for non referral merchants
This commit is contained in:
parent
c30ddd3b64
commit
8c6a58d05c
4 changed files with 28 additions and 24 deletions
|
@ -50,6 +50,14 @@ return array(
|
|||
return true;
|
||||
},
|
||||
|
||||
// We assume it's a referral if we can check product status without API request failures.
|
||||
'googlepay.is_referral' => static function ( ContainerInterface $container ): bool {
|
||||
$status = $container->get( 'googlepay.helpers.apm-product-status' );
|
||||
assert( $status instanceof ApmProductStatus );
|
||||
|
||||
return ! $status->has_request_failure();
|
||||
},
|
||||
|
||||
'googlepay.availability_notice' => static function ( ContainerInterface $container ): AvailabilityNotice {
|
||||
return new AvailabilityNotice(
|
||||
$container->get( 'googlepay.helpers.apm-product-status' ),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue