Update custom event meta

Home Forums Calendar Products Events Calendar PRO Update custom event meta

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1087905
    helloheathergraham
    Participant

    I have a site where events are created programmatically using gravity forms (modified using this). Everything works great EXCEPT I just can’t figure out how to update custom meta/additional fields using this method. The only thing I have successfully been able to do is update the meta as if it were “just” a custom wordpress post (it displays on the bottom of the post edit like standard custom meta. It does NOT register as an additional field in ECP. I understand that this is probably beyond the scope of support but I would love if you have any advice or could point me in the right direction.

    Note: I have reviewed functions relating to custom meta but they all seem to work around querying it vs updating it

    #1087916
    George
    Participant

    Hey there,

    This is indeed, and unfortunately, outside the scope of support we can provide here. πŸ™

    I would recommend contacting the author of that script for assistance here.

    One resource we have that might help is this list of all of the meta keys and names for our various Custom Fields β†’ https://theeventscalendar.com/knowledgebase/wordpress-post-meta-data/

    That might be handy.

    Also, you mention finding functions for querying custom meta but not updating itβ€”one thing that might help, then, is this function specifically made for updating meta β†’ https://codex.wordpress.org/Function_Reference/update_post_meta

    Let me know what thoughts you have about this and if there is anything else we can try to help with!

    Sincerely,
    George

    #1089829
    helloheathergraham
    Participant

    Hello! Thank you for your guidance. I had actually already tried using update_post_meta but it wasn’t saving as an additional field in ECP. It was just saving as custom meta for a wordpress post (my understanding is that these aren’t exactly the same thing). This would have been totally fine except anytime I updated the post I would lose the value of the custom meta.

    It turns out the filter I was using for save_post (for ECP posts) wasn’t checking for meta and therefore was erasing any saved meta values. I just needed to modify it and now it works!

    Thanks again for your help!

    #1090021
    George
    Participant

    Glad to hear it! πŸ™‚

    Best of luck with your site,
    George

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Update custom event meta’ is closed to new replies.