Skip to content

Commit c987bc6

Browse files
committed
Add additional status message to ApplePay domain validation.
1 parent be28f81 commit c987bc6

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

modules/ppcp-applepay/extensions.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949

5050
// Domain validation.
5151
$domain_validation_text = __( 'Status: Domain validation failed ❌', 'woocommerce-paypal-payments' );
52-
if ( $container->get( 'applepay.is_validated' ) ) {
52+
if ( ! $container->get( 'applepay.has_validated' ) ) {
53+
$domain_validation_text = __( 'The domain has not yet been validated. Use the Apple Pay button to validate the domain ❌', 'woocommerce-paypal-payments' );
54+
} elseif ( $container->get( 'applepay.is_validated' ) ) {
5355
$domain_validation_text = __( 'Status: Domain successfully validated ✔️', 'woocommerce-paypal-payments' );
5456
}
5557

modules/ppcp-applepay/services.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@
6262
);
6363
},
6464

65+
'applepay.has_validated' => static function ( ContainerInterface $container ): bool {
66+
$settings = $container->get( 'wcgateway.settings' );
67+
return $settings->has( 'applepay_validated' );
68+
},
69+
6570
'applepay.is_validated' => static function ( ContainerInterface $container ): bool {
6671
$settings = $container->get( 'wcgateway.settings' );
6772
return $settings->has( 'applepay_validated' ) ? $settings->get( 'applepay_validated' ) === true : false;

0 commit comments

Comments
 (0)