Support » Plugin: All-in-One Event Calendar » Hook into imported event saved

  • Resolved rostam24


    Hi, first of all thank you for this great plugin!
    I have created a website that automatically imports events from all over the world of a specific martial art, and then translates it automatically using the transposh plugin.

    In order for this functionality to work, I need a hook so that when an imported event is saved, my custom code will then set its transposh language.
    I used to get this working by adding a custom hook into class-ai1ec-importer-helper.php (right under event->save()). However, I now updated this plugin so my hook is gone. In fact, I don’t think this class exists anymore.

    So, what I need is a way to hook into an imported event being saved. Is there an existing hook I can use? If not, where should I add my custom hook in the current version of ai1ec to kickstart my custom function?

    Thank you very much for your help! I hope someone can help 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor nicola.peluchetti



    we fire an action

    do_action( 'ai1ec_event_saved', $post_id, $this, $update );

    after saving. But i think this is not fired when updating. Do you import from ics feeds?

    Yes I import from ICS feeds.
    I will try your hook and let you know if it works. Thanks for the quick reply!

    Thank you, the hook seems to work and I have managed to set the language of imported events!
    You mentioned ics feeds – is there anything special I should know about that?

    In any case, I am very happy – this plugin is awesome!

    Plugin Contributor nicola.peluchetti


    i think that the hook is fired only when an event is created and not when an event is updated but i’m not 100% sure.
    Let me know if you have troubles.
    I’m marking this as solved for now

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hook into imported event saved’ is closed to new replies.