Making community events POST to an API?

Home Forums Welcome! Pre-Sales Questions Making community events POST to an API?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #190177
    Tom SCL
    Guest

    Hi there,

    We have a requirement to have an events list/calendar on a website where the public can add their own events but they are moderated before the appear on the site so we’re looking at your Community Events events plugin.

    However another requirement is that when a new event is publish on the site it is also posted to an 3rd party API. We are PHP developers and prepared to write the code to communicate with the API but we would want to do it without hacking the Community Events plugin code. So my question is, does the Community Events plugin provide any event hooks in it’s API which would could used to do this or would this only be possible by hacking the plugin code?

    Thanks for your time and I look forward to a reply,
    Tom

    #191493
    Casey
    Participant

    Tom,
    Thanks for getting in touch! Since the Community Submission form just creates a new post (with the status that you designate in your Community settings), then you should be able to use any of the core WordPress hooks to achieve what you are looking to do:

    * {$new_status}_{$post->post_type} would work as you pointed out – http://adambrown.info/p/wp_hooks/hook/%7B$new_status%7D_%7B$post-%3Epost_type%7D
    * wp_insert_post is another – http://adambrown.info/p/wp_hooks/hook/wp_insert_post
    * save_post is yet another – http://adambrown.info/p/wp_hooks/hook/save_post

    Hope that helps. Thanks! 🙂

    -Casey-

    #200639
    Tom SCL
    Guest

    Hi Casey,
    Thanks for your reply, it sounds like what we need, I’ll have a read through the links you provided to confirm then hopefully will be able to use this approach.

    Many thanks for your time,
    Tom

    #810235
    Barry
    Member

    It’s been quite a while so I will close this thread: definitely feel free to create new threads if you need any further help 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Making community events POST to an API?’ is closed to new replies.