Sorry for the delay in getting back to this…
One question I have, perhaps because I’m not understanding _quite_ how this works, is how to I actually fetch the saved value of that custom field.
IE I have a profile form where the user will type in a password.
Then I have the above function you suggested in my functions.php and I’m using a wp_mail() function to test what its doing/returning…
wp_mail( 'firstname.lastname@example.org', 'test', $post_id.' / '.get_field('user_password', $post_id));
IE this is where I’d have the wp_set_password() function.
What I’m getting from the above is
get_field('user_password', $post_id) isn’t returning anything.
So how do I actually get the value of that field?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We've just released ACF 5.12.3 with a security fix to prevent arbitrary file uploads to forms with ACF fields.— Advanced Custom Fields (@wp_acf) July 14, 2022
Now that we've released this update, we recommend updating your sites as soon as possible.
© 2022 Advanced Custom Fields.