Support

Account

Home Forums General Issues Update date field

Helping

Update date field

  • Hello,

    I want to update a date field in a custom plugin.
    This is my code:

    update_field( 'last_email', date("ymd"), 'user_'.$user_id );

    But this is not updating in WP Backend.

    What am I doing wrong? Thanks!

  • Hello @pikciu,

    Have you tried using the $field_key in update_field(…) in the place of the $field_name? Try this, replace the field_name with the field_key.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Update date field’ is closed to new replies.