mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Add webhook status to status report
This commit is contained in:
parent
27d71e14c3
commit
f845acefbe
5 changed files with 124 additions and 4 deletions
|
@ -21,6 +21,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
|
|||
use WooCommerce\PayPalCommerce\Button\Helper\MessagesApply;
|
||||
use WooCommerce\PayPalCommerce\Compat\PPEC\PPECHelper;
|
||||
use WooCommerce\PayPalCommerce\Onboarding\State;
|
||||
use WooCommerce\PayPalCommerce\Webhooks\WebhookInfoStorage;
|
||||
|
||||
/**
|
||||
* Class StatusReportModule
|
||||
|
@ -64,6 +65,9 @@ class StatusReportModule implements ModuleInterface {
|
|||
/* @var MessagesApply $messages_apply The messages apply. */
|
||||
$messages_apply = $c->get( 'button.helper.messages-apply' );
|
||||
|
||||
$last_webhook_storage = $c->get( 'webhook.last-webhook-storage' );
|
||||
assert( $last_webhook_storage instanceof WebhookInfoStorage );
|
||||
|
||||
/* @var Renderer $renderer The renderer. */
|
||||
$renderer = $c->get( 'status-report.renderer' );
|
||||
|
||||
|
@ -103,6 +107,11 @@ class StatusReportModule implements ModuleInterface {
|
|||
$messages_apply->for_country()
|
||||
),
|
||||
),
|
||||
array(
|
||||
'label' => esc_html__( 'Webhook status', 'woocommerce-paypal-payments' ),
|
||||
'description' => esc_html__( 'Whether we received webhooks successfully.', 'woocommerce-paypal-payments' ),
|
||||
'value' => $last_webhook_storage->is_empty() ? 'Unknown' : 'OK',
|
||||
),
|
||||
array(
|
||||
'label' => esc_html__( 'Vault enabled', 'woocommerce-paypal-payments' ),
|
||||
'description' => esc_html__( 'Whether vaulting is enabled on PayPal account or not.', 'woocommerce-paypal-payments' ),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue