mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Show webhooks
This commit is contained in:
parent
0b029a9392
commit
e2a7f6d8d9
12 changed files with 5132 additions and 7 deletions
|
@ -9,4 +9,28 @@ declare(strict_types=1);
|
|||
|
||||
namespace WooCommerce\PayPalCommerce\Webhooks;
|
||||
|
||||
return array();
|
||||
use WooCommerce\PayPalCommerce\Onboarding\State;
|
||||
use WooCommerce\PayPalCommerce\Webhooks\Status\WebhooksStatusPage;
|
||||
|
||||
return array(
|
||||
'wcgateway.settings.fields' => static function ( $container, array $fields ): array {
|
||||
$status_page_fields = array(
|
||||
'webhooks-list' => array(
|
||||
'title' => __( 'Registered webhooks', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-table',
|
||||
'screens' => array(
|
||||
State::STATE_PROGRESSIVE,
|
||||
State::STATE_ONBOARDED,
|
||||
),
|
||||
'requirements' => array(),
|
||||
'gateway' => WebhooksStatusPage::ID,
|
||||
'classes' => array( 'ppcp-webhooks-table' ),
|
||||
'value' => function () use ( $container ) : array {
|
||||
return $container->get( 'webhook.status.registered-webhooks-data' );
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
return array_merge( $fields, $status_page_fields );
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue