Hi @iamhexcoder
That’s because, at some point when ACF saves the data, the $_GET['post']
global variable is not available. Could you please try to get the ID like this:
if( isset( $_GET['post'] ) ){
$post_id = $_GET['post'];
} elseif ( isset( $_POST['post_ID'] ) ){
$post_id = $_POST['post_ID'];
} else {
$post_id = '0';
}
I hope this helps 🙂