From 5b68a031a6ac0f6851e1d4f0717caa6db802723c Mon Sep 17 00:00:00 2001 From: Swanand01 Date: Mon, 24 Jun 2024 18:32:00 +0530 Subject: [PATCH] Enable revisions for PRODUCTS_POST_META_KEY --- includes/Shopping/Product_Meta.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/includes/Shopping/Product_Meta.php b/includes/Shopping/Product_Meta.php index 1df32a99a1c9..fe23bec2d743 100644 --- a/includes/Shopping/Product_Meta.php +++ b/includes/Shopping/Product_Meta.php @@ -91,18 +91,19 @@ public function register_meta(): void { 'post', self::PRODUCTS_POST_META_KEY, [ - 'type' => 'object', - 'description' => __( 'Products', 'web-stories' ), - 'show_in_rest' => [ + 'type' => 'object', + 'description' => __( 'Products', 'web-stories' ), + 'show_in_rest' => [ 'schema' => [ 'type' => 'object', 'properties' => [], 'additionalProperties' => true, ], ], - 'default' => [], - 'single' => true, - 'object_subtype' => $this->story_post_type::POST_TYPE_SLUG, + 'default' => [], + 'single' => true, + 'object_subtype' => $this->story_post_type::POST_TYPE_SLUG, + 'revisions_enabled' => true, ] ); }