Support

Account

Home Forums ACF PRO Get ACF Value in Ajax Callback Function

Solving

Get ACF Value in Ajax Callback Function

  • Hi,

    I am facing difficulty in accessing ACF value in ajax callback function. I am accessing it through get_sub_field(‘fieldname’) but it is showing 500 error. Can you let me know that is there any other way to access ACF in ajax?

    Thanks.

  • Hi @muneebafaheem

    I assume the value already exists?

    What’s your code so we can take a look and try to help?

    Do any other sub fields work or is it just one?

    Are you passing the post ID to the repeater in your Ajax?

  • Thanks for your reply. Now I am getting sub-field value. I was passing wrong block that’s why it was causing an issue.

    Basically, I am working on custom coupon codes. For this, I am assigning coupon codes to specific users from wp-admin through ACF users. But can you please let me know how can I implement it’s function in ajax callback?

    Thanks.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.