I have a PHP program which extracts event data from a membership system (not in WordPress) and uses the data to create ICS calendar files which are shown in a WordPress website. The PHP program and the WordPress site are hosted by the same company but are in different domains.
Part of the extract process is to lookup the email address for the group that is hosting each event as that is not consistently available in the membership system. That email address is held in an ACF field associated with the custom post type for the group.
What I would like to do is to have the extract program access the WordPress database and find the email address in the ACF field for the correct group.
I am not sure this is feasible to do but any suggestions as to the code I could use in the external PHP program to query the ACF field with the group name or ID would be very welcome.
You would first need to know where the ACF field is saved. This would depend if the group is a post or a term or something else. You will need the ID of the post or the term you would need to query the correct table to get this informsion. Using this you would then need to query either the “_postmeta” or the “_term_meta” table using the ID and the ACF field name.
I do not know how you would do this outside of WP.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users