WeTicket WordPress Sync releases
WordPress plugin that syncs WeTicket events into a custom post type, rendered with Twig.
by WeTicket · github.com/weticketio/weticket-wordpress-sync · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/weticketio/weticket-wordpress-sync/releases/download/v1.1.1/weticket-wordpress-sync-v1.1.1.zipReadme
WeTicket WordPress Sync
Periodically syncs events from a WeTicket Storefront RSS feed into a custom post type, rendered with Twig templates.
| Requires WordPress | 5.8+ |
| Tested up to | 6.5 |
| Requires PHP | 7.4+ |
| Stable tag | 1.1.1 |
| License | GPLv2 or later |
| Tags | events, ticketing, weticket, sync, twig |
Description
WeTicket WordPress Sync reads the WeTicket Storefront RSS feed (events.xml) on a schedule and creates/updates a post in the WeTicket Events custom post type (weticket_event) for each event.
Titles and content are rendered with Twig. Because Twig runs in non-strict mode, template variables that the feed does not provide simply render empty instead of erroring, so templates stay robust as the feed evolves.
What the feed provides
The WeTicket Storefront RSS feed exposes a focused set of fields. These map to the following Twig variables:
title— event titledescription/text— plain-text event descriptionshortDescription— short plain-text description (weticket:short_description, also stored as the post excerpt)textHtml— HTML event description (used as the post content by default)start— start date/time (ev:startdate)end— end date/time (ev:enddate)tickets_url— link to the ticket shopvenue.title/location.name— venue (ev:location)organizationName— organizer (ev:organizer)status— defaults toonsale(the feed only lists upcoming events)media.mainImageUrl— cover image whenmedia:contentis present (set as the featured image)guid— the WeTicket event UUID (used to match events across syncs)
Variables that this feed does not provide (prices, categories, programItems, status_internal, and so on) are not populated and render empty.
Custom fields (visible & REST-exposed)
In addition to rendering the title and content, each event stores its data as public custom fields so themes, ACF, and page builders can read individual values without parsing the content HTML. These appear in the Custom Fields metabox and the REST API:
weticket_startweticket_endweticket_tickets_urlweticket_venueweticket_organizerweticket_short_description(short plain text)weticket_description(plain text)weticket_text_html(HTML)weticket_statusweticket_pubdate
A few internal values stay protected (hidden) because they are plumbing rather than content: _weticket_guid (used to match events across syncs), _weticket_synced_at, and _weticket_image_url.
Settings
Settings → WeTicket Sync:
- Feed URL
- Sync interval (15 minutes / hourly / twice daily / daily)
- What to do when an event leaves the feed (set to draft / move to trash / leave published)
- Title and content Twig templates
- A "Sync now" button and last-run status
Installation
- Upload the plugin to
wp-content/plugins/weticket-wordpress-sync. - If installing from source, run
composer installin the plugin directory to vendor Twig. - Activate the plugin.
- Go to Settings → WeTicket Sync, set your feed URL, and click "Sync now".
Frequently Asked Questions
How are duplicate events avoided?
Each event's WeTicket UUID (the RSS guid) is stored in the _weticket_guid post meta. On every sync the plugin matches events by that UUID and updates the existing post instead of creating a new one.
What happens to events that disappear from the feed?
Configurable: set them to draft (default), move them to trash, or leave them published.
Development
Install dependencies and run the test suite:
composer install
vendor/bin/phpunit
Continuous integration (GitHub Actions) runs the test suite on PHP 7.4, 8.1, and 8.3 for every push to main and every pull request.
Releasing
Tag a version to build and publish the installable zip as a GitHub Release asset:
git tag v1.0.0
git push origin v1.0.0
The release workflow installs production dependencies only (Twig, no dev tools), packages the weticket-wordpress-sync/ plugin folder with vendor/ bundled, and attaches weticket-wordpress-sync-v1.0.0.zip to the release — ready to upload to WordPress.
Changelog
1.1.1
- Fix: the short description was never picked up from live feeds. The feed emits camelCase
<weticket:shortDescription>while the parser only looked for snake_case<weticket:short_description>; both spellings are now accepted. - Self-heal the sync schedule: if the recurring
weticket_sync_cronevent is missing from the cron queue (cleared by a migration, restore, or cleanup plugin), it is re-created on the next page load instead of requiring plugin reactivation. Re-creation is guarded by an atomic lock (INSERT IGNOREon the options table) so concurrent requests cannot schedule duplicate events. - Fix activation with the 15-minute interval selected: the activation hook runs after
plugins_loaded, so the customweticket_15minschedule was not registered yet andwp_schedule_event()failed silently, leaving no sync scheduled.schedule()now registers the interval itself.
1.1.0
- Sync the short description (
weticket:short_description) from the feed: available as theshortDescriptionTwig variable, stored in theweticket_short_descriptioncustom field, and set as the post excerpt.
1.0.1
- The feed URL no longer defaults to a staging URL; it must be configured per site. Syncing is skipped (and logged) until it is set.
1.0.0
- Initial release: scheduled RSS sync into the
weticket_eventpost type with Twig templating.
Read the full README on GitHub →