0

I have the latest WordPress version and PHP 7.3 I would like to use the API that is available since 4.7 as long as I read. For now, I have installed the ACF Pro and I have added some custom fields in Users

But my problem is that these custom fields does not appear in API I would prefer not to use any plug-ins (if it is not nessasery in order to have a stable code, rather than updates and plug-ins covering other plug-ins.. and so on.. ), but of course if this is the only and easier way, let's go we that!

I have done so far "How to expose all the ACF fields to Wordpress REST API in both pages and custom postypes" through another post here in overflow: How to expose all the ACF fields to Wordpress REST API in both pages and custom postypes which it was also helpful for other reasons.

I have already installed ACF to REST API - v3 plugin, but I do not know the next steps.. Custom fields still does not appear yet. what should I do after that?

Furthermore, I have tried and installed "JSON API User" but I think I am missing something..

Could you give me some explanations how all these works, and steps to continue? I would like to have my custom fields of Users available to API (fields I have like classes, sectiones, PIN and so on)

  • Hey Kiriakos, Are you able to see the "acf" object to the JSON API Response? – Jenil Kanani Feb 18 '20 at 07:54
  • Hello, thanks for your reply.. I see that, if I grab the link that gives me https://www.example.com/wp-json/acf/v3/users and get the users I get the acf object but it is empty for subscribers... For admins and editors I get the custom values!! I just saw it.. what about the subscribers and other users level? – Kiriakos Grhgoriadhs Feb 18 '20 at 09:51
  • I think the API does not require any access level for pulled-out the custom field values. Can you confirm whether the subscriber role user custom field value is updated to CMS? – Jenil Kanani Feb 19 '20 at 11:25
  • 1
    Hello Jenil! I found something but really strange.. I have imported these users through WP All Import Pro plugin.. and now I just edit one of the users and just hit save. after that the information of this user displayed normally .. Just now I did a simple save to all of them and worked.. But why is that? guess it is a bug of import plugin? ... never know – Kiriakos Grhgoriadhs Feb 19 '20 at 17:46
  • 1
    Hi Kiriakos, I don't think so this is a bug of WP All Import Pro, As the value is appearing properly to CMS as you mentioned. I also faced the same issue before with different case and update post workaround help me :) You can raise this concern to WP All Import Pro help-desk, they might helpful for this. Thanks – Jenil Kanani Feb 20 '20 at 09:45

0 Answers0