v2 API should also use wc_get_webhook_statuses for the enum in the schema status

This commit is contained in:
Gerhard 2018-12-14 08:08:56 +02:00
parent ac9b588147
commit 4daafd28e4
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ class WC_REST_Webhooks_V2_Controller extends WC_REST_Webhooks_V1_Controller {
'description' => __( 'Webhook status.', 'woocommerce' ),
'type' => 'string',
'default' => 'active',
'enum' => array( 'active', 'paused', 'disabled' ),
'enum' => array_keys( wc_get_webhook_statuses() ),
'context' => array( 'view', 'edit' ),
),
'topic' => array(