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)

5
  • Hey Kiriakos, Are you able to see the "acf" object to the JSON API Response? Commented Feb 18, 2020 at 7:54
  • Hello, thanks for your reply.. I see that, if I grab the link that gives me 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? Commented Feb 18, 2020 at 9: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? Commented Feb 19, 2020 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 Commented Feb 19, 2020 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 Commented Feb 20, 2020 at 9:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.