WordPress – Update User Profile function
-
I have the following function in my functions.php file:-
function apply_for_job() { $job_id = $_GET['job_id']; $user_id = get_current_user_id(); $prev_value = get_field('applied_jobs'); update_user_meta($user_id, 'applied_jobs', $job_id); } add_filter('init' ,'apply_for_job');
When I load: https://distinct.dev/apply_for_job/?job_id=323
This updates ‘applied_jobs’ field to: 323 as expected.
However, when I go on my user profile page it sets the value to ‘NULL’
Any ideas why?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WordPress – Update User Profile function’ is closed to new replies.