cliff
8/18/2017 - 2:51 AM

Disable The Events Calendar's REST API functionality.

Disable The Events Calendar's REST API functionality.

<?php

/**
 * Disable The Events Calendar's and Event Tickets' REST API functionality.
 *
 * The Events Calendar: Will disallow other sites running Event Aggregator from importing events from the site with the
 * REST API disabled.
 * Event Tickets: Will disallow using Modern Tribe's QR Code Scanner app.
 *
 * @link https://gist.github.com/cliffordp/37f45031be10f30e27dbba63b46bcec6
 */
add_filter( 'tribe_events_rest_api_enabled', '__return_false' );
add_filter( 'tribe_tickets_rest_api_enabled', '__return_false' );