mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add GooglePay onboarding improvements.
This commit is contained in:
parent
bad21380b3
commit
b703f17bbf
7 changed files with 31 additions and 16 deletions
|
@ -37,12 +37,15 @@ return array(
|
|||
|
||||
// If GooglePay is configured.
|
||||
'googlepay.available' => static function ( ContainerInterface $container ): bool {
|
||||
/**
|
||||
* $status = $container->get( 'googlepay.helpers.apm-product-status' );
|
||||
* assert( $status instanceof ApmProductStatus );
|
||||
* return $status->is_active();
|
||||
*/
|
||||
return true; // TODO: must test further.
|
||||
if ( apply_filters( 'woocommerce_paypal_payments_googlepay_validate_product_status', false ) ) {
|
||||
$status = $container->get( 'googlepay.helpers.apm-product-status' );
|
||||
assert( $status instanceof ApmProductStatus );
|
||||
/**
|
||||
* If merchant isn't onboarded by use via /v1/customer/partner-referrals this returns false as the api call fails.
|
||||
*/
|
||||
return apply_filters( 'woocommerce_paypal_payments_googlepay_product_status', $status->is_active() );
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
'googlepay.helpers.apm-product-status' => static function( ContainerInterface $container ): ApmProductStatus {
|
||||
|
@ -61,7 +64,7 @@ return array(
|
|||
* Returns which countries and currency combinations can be used for GooglePay.
|
||||
*/
|
||||
return apply_filters(
|
||||
'woocommerce_paypal_payments_supported_country_currency_matrix',
|
||||
'woocommerce_paypal_payments_googlepay_supported_country_currency_matrix',
|
||||
array(
|
||||
'US' => array(
|
||||
'AUD',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue