Updating current events

Home Forums Calendar Products Event Aggregator Updating current events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1130120
    jadecreative
    Participant

    Hi, I’m looking at using this importer for another project and wanted to follow up to see if an original issue has been resolved with this extension.

    Essentially, the feed wasn’t bringing through updates to current events. So if an event was updated in the feed, the update didn’t come through to the existing event. This relates to changes to event details or the event being deleted completely.

    Is there a way to allow the feed to ‘replace all existing events with events in the feed?’ so that we get updated events?

    Thanks, Patrick.

    #1130616
    Andras
    Keymaster

    Hi Patrick,

    Welcome back!

    At the moment the iCal importer only imports new events. It cannot automatically update events that have already been imported.

    The only way to update already imported events is to first delete the event, second totally purge the event from the database. For this second move you will need the following snippet:
    /*
    * Deletes the saved copy of "deleted" events generated by iCal Importer
    * This allows you to re-import events. The script deletes 50 instances per admin page load
    * (Re)load any admin page until you see the message "Done deleting!" Then remove snippet.
    * Code by Nico; enhancement by Andras
    */
    function del_deleted_events () {
    $posts = get_posts( array( 'post_type'=>'deleted_event', "posts_per_page" => 50, 'post_status' => 'trash', ) );
    if (!empty($posts)) {
    foreach ($posts as $post) {
    wp_delete_post( $post->ID, true);
    }
    echo '<p style="background-color:yellow;z-index:1;text-align:right;">50 deleted events removed, refresh again</p>';
    }
    else {
    echo '<p style="background-color:yellow;z-index:1;text-align:right;">Done deleting!</p>';
    }
    }
    add_action( 'admin_init', 'del_deleted_events' );

    Let me know if this answers your question.

    Cheers,
    Andras

    #1130634
    jadecreative
    Participant

    Thanks for your reply, is there any plan in place to accommodate this need as I’d imagine a few users would like for existing events to be updated on import?

    Based on what you have said above we have to manually delete the event from WP admin > then purge > then fetch? Can this be automated in some way so that our client doesn’t have to do this?

    #1131120
    Andras
    Keymaster

    Hello again Patrick,

    At the moment we are not working on this feature. If this is something you would like as a feature I encourage you to visit our User Voice Page and either upvote an existing request or make a new request there.

    Most probably that process could be automated with some customization work. However we are limited in doing that and providing support for customizations.

    Here’s a list of freelancers who could help you out with this and who are not affiliated with us.

    Let me know if you have any follow up questions.

    Cheers,
    Andras

    #1137314
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Updating current events’ is closed to new replies.