mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Add PayPal Vault enabled and ACDC Vault enabled on WooCommerce System status
Remove Vault enabled on WooCommerce System status
This commit is contained in:
parent
583dea8d99
commit
bf5179d374
1 changed files with 12 additions and 19 deletions
|
@ -120,11 +120,19 @@ class StatusReportModule implements ModuleInterface {
|
|||
'value' => $this->bool_to_html( ! $last_webhook_storage->is_empty() ),
|
||||
),
|
||||
array(
|
||||
'label' => esc_html__( 'Vault enabled', 'woocommerce-paypal-payments' ),
|
||||
'exported_label' => 'Vault enabled',
|
||||
'description' => esc_html__( 'Whether vaulting is enabled on PayPal account or not.', 'woocommerce-paypal-payments' ),
|
||||
'label' => esc_html__( 'PayPal Vault enabled', 'woocommerce-paypal-payments' ),
|
||||
'exported_label' => 'PayPal Vault enabled',
|
||||
'description' => esc_html__( 'Whether vaulting option is enabled on Standard Payments settings or not.', 'woocommerce-paypal-payments' ),
|
||||
'value' => $this->bool_to_html(
|
||||
$this->vault_enabled( $bearer )
|
||||
$settings->has( 'vault_enabled' ) && $settings->get( 'vault_enabled' )
|
||||
),
|
||||
),
|
||||
array(
|
||||
'label' => esc_html__( 'ACDC Vault enabled', 'woocommerce-paypal-payments' ),
|
||||
'exported_label' => 'ACDC Vault enabled',
|
||||
'description' => esc_html__( 'Whether vaulting option is enabled on Advanced Card Processing settings or not.', 'woocommerce-paypal-payments' ),
|
||||
'value' => $this->bool_to_html(
|
||||
$settings->has( 'vault_enabled_dcc' ) && $settings->get( 'vault_enabled_dcc' )
|
||||
),
|
||||
),
|
||||
array(
|
||||
|
@ -192,21 +200,6 @@ class StatusReportModule implements ModuleInterface {
|
|||
return $token->is_valid() && $current_state === $state::STATE_ONBOARDED;
|
||||
}
|
||||
|
||||
/**
|
||||
* It returns whether vaulting is enabled or not.
|
||||
*
|
||||
* @param Bearer $bearer The bearer.
|
||||
* @return bool
|
||||
*/
|
||||
private function vault_enabled( Bearer $bearer ): bool {
|
||||
try {
|
||||
$token = $bearer->bearer();
|
||||
return $token->vaulting_available();
|
||||
} catch ( RuntimeException $exception ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if reference transactions are enabled in account.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue