Venue matching in iCal

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 6 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #29622

    Hi,

    Is there any way to make the import of venues from an iCal feed a little more flexible, e.g. using a regular expression? If one character is off the import creates a new venue… Thanks!

    Edward Weiss
    #29626

    Hi Edward,

    This is kind of possible. You can filter the venue array of any imported venues, and change their name so they match the appropriate existing venue:

    add_filter( 'eventorganiser_ical_import_venue', function($venue, $event, $event_id, $ical){
        //change $venue['name'] so that it matches the name of an existing venue
        return $venue;
    }, 10, 4);
    
    Stephen Harris
    #29632

    Thanks, Stephen.

    Dumb question — what do I do with this snippet? 🙂

    Edward Weiss
    #29644

    You can put it in theme’s functions.php, or preferably a custom plugin:

    https://wp-event-organiser.com/blog/tutorial/where-should-i-put-code-from-the-tutorials/

    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.