Ok I had to return post_id for it to be saved.
Still, I don’t get why with this code, when the honeypot ‘surname3’ is not empty, the form still get saved, altough completely empty.
Isn’t die supposed to terminate the whole process?
function my_honey_pot( $post_id ) {
if(! empty($_POST['surname3'])){
die("");
} else {
return $post_id;
}
}
add_action('acf/pre_save_post' , 'my_honey_pot' );
It’s even more incomprehensible: the script dies, but the form still get submitted, empty, when the honey pot is not empty.
@sododesign your code (when the honeypot is empty) causes the form to pass and be submitted but with empty values.
It’s as if this code empties the POST from all it’s values.
Why is beyond my comprehension. Do you know why?