Giter Club home page Giter Club logo

Comments (6)

Sandstedt avatar Sandstedt commented on June 3, 2024 1

@danimalweb
We ended up exporting the fields to a JSON file, deleted the ACF declarations, changed the root id to another random id in the JSON file, and then imported it again. Then it "just worked". But a cumbersome workaround. So will leave this open. But the example URL's in this issue will now work correctly, so have removed them.

from acf-to-rest-api.

Sandstedt avatar Sandstedt commented on June 3, 2024

Just gonna note that adding fields to non-flexible content fields seems to work. Just added fields to an options page with a plain hierarchy, and that worked just fine. Will try to investigate a bit more. But a bit hard when I don't know how everything is connected among pages and meta data.

from acf-to-rest-api.

danimalweb avatar danimalweb commented on June 3, 2024

I am having a similar issue. I am not using Flexible fields.

from acf-to-rest-api.

fringley avatar fringley commented on June 3, 2024

I think I am experiencing the same issue, though mine is with a custom field group that was added to users.

Whilst the values on these fields appears to be persisted (from some business logic when a user registers), none of the values make it into the JSON response until I go in and edit them manually (or re-save the account) from within WP Admin.

I've included two screenshots, one which shows how many lines present in the JSON response before re-saving the account (175 lines) and the second one after saving (178 lines).

Strangely, in the ACF group, one of the fields does come through every time - it only seems to be a recently added fields that are not appearing. Also other ACF groups work perfectly all the time.

less-fields

more-fields

I would love to help track down this issue and work on a fix - as it is really affecting the operation of my site (as I need to go in and re-save every new user!)

from acf-to-rest-api.

fringley avatar fringley commented on June 3, 2024

Hi @airesvsg Any idea about this - it's causing me huge issues with using this plugin as some fields are missing on the API, even though there are values set on the user object!

from acf-to-rest-api.

fringley avatar fringley commented on June 3, 2024

Was doing some further investigation today... It seems that all ACF fields are being returned if I use the WooCommerce API
... e.g. https://DOMAIN/wp-json/wc/v3/customers/600 is correctly displaying the field within the meta_data section of the response.

from acf-to-rest-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.