Skip to content

Commit

Permalink
Experiment: Use 'revisions_enabled' => true with register_post_meta
Browse files Browse the repository at this point in the history
  • Loading branch information
Swanand01 committed Jun 24, 2024
1 parent db0c3af commit 2e9e7ea
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions includes/Shopping/Product_Meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,22 @@ public function register(): void {
* @since 1.22.0
*/
public function register_meta(): void {
register_meta(
'post',
register_post_meta(
$this->story_post_type::POST_TYPE_SLUG,
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,
'revisions_enabled' => true,
]
);
}
Expand Down

0 comments on commit 2e9e7ea

Please sign in to comment.