Support

Account

Home Forums Front-end Issues ACF data not showing after Ajax call Reply To: ACF data not showing after Ajax call

  • Hi @jarvis,

    Thanks for replying, I managed to solve it using

    get_field('tax_amount', $post_id)

    and making sure the following was at the top;

    `global $post;

    $post_id = false;
    if (defined(‘DOING_AJAX’) && DOING_AJAX) {
    if (isset($_GET[‘post_id’])) {
    $post_id = $_GET[‘post_id’];
    }
    } else {
    $post_id = $post->ID;
    }`