Title: Access protected fields
Last modified: August 30, 2016

---

# Access protected fields

 *  Resolved [edmondox](https://wordpress.org/support/users/edmondox/)
 * (@edmondox)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/access-protected-fields/)
 * We need to update and amend protected fields (those with names preceded by _underscore
   in the database) via WP API. We have a temporary solution – hacking the plugin
   to replace all calls to is_protected_meta with a function which always returns
   false. Clearly this is not sustainable, so how is the requirement to access protected
   fields via WP API correctly enabled?
 * [https://wordpress.org/plugins/json-rest-api/](https://wordpress.org/plugins/json-rest-api/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/access-protected-fields/#post-6677259)
 * You should [filter `json_prepare_posts`](https://github.com/WP-API/WP-API/blob/master/lib/class-wp-json-posts.php#L691)
   to include whatever meta fields you’ve whitelisted.

Viewing 1 replies (of 1 total)

The topic ‘Access protected fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/json-rest-api_2e3641.svg)
 * [WP REST API (WP API)](https://wordpress.org/plugins/json-rest-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-rest-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-rest-api/)
 * [Active Topics](https://wordpress.org/support/plugin/json-rest-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-rest-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-rest-api/reviews/)

## Tags

 * [protected](https://wordpress.org/support/topic-tag/protected/)
 * [underscore](https://wordpress.org/support/topic-tag/underscore/)

 * 1 reply
 * 2 participants
 * Last reply from: [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/access-protected-fields/#post-6677259)
 * Status: resolved