Support

Account

Home Forums Bug Reports delete_field() not working in 5.6.7

Unread

delete_field() not working in 5.6.7

  • I do want to point out that I am loading ACF through another plugin, but all other functionality up to this moment works. I am using the API intensively.

    I have a button that calls some AJAX. Stripping away pretty much everything, the following code does not work. When echoing – the field still returns content.

    delete_field('zbp_cache', $post_id);
    echo get_field('zbp_cache', $post_id);

    No errors are thrown in the debug monitor or ajax response console.

    This code below DOES work. The only thing I’ve changed is the ACF wrapper function to the native WP function.

    delete_post_meta($post_id, 'zbp_cache');
    echo get_field('zbp_cache', $post_id);
Viewing 1 post (of 1 total)

The topic ‘delete_field() not working in 5.6.7’ is closed to new replies.