Home › Forums › Backend Issues (wp-admin) › Ajax the ACF way › Reply To: Ajax the ACF way
I was adding the hook inside the custom field class __construct:
class acf_field_my_custom_field extends acf_field {
//ajax hooks here
}
That’s in the acf-my_custom_field-v5 file.
I couldn’t get it to work there, so I added out side the class in the main plugin file, and it worked. However that creates another problem… I don’t have access to the data inside the class my_custom_field.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.