From 4daafd28e4aaaeac4c1fccc622c66bd83c655681 Mon Sep 17 00:00:00 2001 From: Gerhard Date: Fri, 14 Dec 2018 08:08:56 +0200 Subject: [PATCH] v2 API should also use wc_get_webhook_statuses for the enum in the schema status --- includes/api/v2/class-wc-rest-webhooks-v2-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/v2/class-wc-rest-webhooks-v2-controller.php b/includes/api/v2/class-wc-rest-webhooks-v2-controller.php index 5e7828e3d78..746d17e938e 100644 --- a/includes/api/v2/class-wc-rest-webhooks-v2-controller.php +++ b/includes/api/v2/class-wc-rest-webhooks-v2-controller.php @@ -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(