When post data that resides in the post table is updated via the API, a revision is created. Not so when only post meta is updated.
The API still calls update_post_meta(), so you could hook “update_postmeta”, verify REST_REQUEST
is true, then insert your own revision post record. The problem then is there could be two revisions if post table data is also updated. You’d need to check for yourself if the current post has changed from the last revision. If it has, don’t insert a revision post since WP will do that itself.
There might be an easier way. I’ve not tested it to verify. Hook something early like “rest_init” and verify the request is updating post meta. If so, hook “wp_save_post_revision_post_has_changed” and return true
. This should cause a revision to be created even if the post table data has not changed.