mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
Filter onboarding
This commit is contained in:
parent
de11044010
commit
da0dcdef89
1 changed files with 4 additions and 1 deletions
|
@ -33,7 +33,10 @@ return array(
|
||||||
'applepay.enabled' => static function ( ContainerInterface $container ): bool {
|
'applepay.enabled' => static function ( ContainerInterface $container ): bool {
|
||||||
$status = $container->get( 'applepay.apple-product-status' );
|
$status = $container->get( 'applepay.apple-product-status' );
|
||||||
assert( $status instanceof AppleProductStatus );
|
assert( $status instanceof AppleProductStatus );
|
||||||
return true;
|
/**
|
||||||
|
* If merchant isn't onboarded via /v1/customer/partner-referrals this returns false as the API call fails.
|
||||||
|
*/
|
||||||
|
return apply_filters( 'woocommerce_paypal_payments_applepay_product_status', $status->apple_is_active() );
|
||||||
},
|
},
|
||||||
'applepay.server_supported' => static function ( ContainerInterface $container ): bool {
|
'applepay.server_supported' => static function ( ContainerInterface $container ): bool {
|
||||||
return ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] !== 'off';
|
return ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] !== 'off';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue