1. Disabling Auto-Updates:To prevent EventPrime from automatically updating to the latest version, you can disable auto-updates by adding the following code to your theme’s functions.php file:
add_filter(‘auto_update_plugin’, ‘__return_false’);
Please note that we will disable auto-updates for EventPrime 4.0.0 version in WordPress, some hosting servers may have settings that override this. It’s advisable to check with your hosting provider if you continue to receive automatic updates despite the above setting.
2. For fetching events between two dates and retrieving details such as categories, organizers, or venues, you can use the Eventprime_Basic_Functions class instead of using
EventM_Event_Controller_List
class. Here’s how you can adapt your existing code:
$event_controller = new Eventprime_Basic_Functions();
$query = apply_filters( 'ecn_fetch_events_args-' . $this->get_identifier(), [
'meta_query' => [
'relation' => 'AND',
[
[
'key' => 'em_start_date',
'value' => $start_date,
'compare' => '>=',
'type' => 'NUMERIC',
],
[
'key' => 'em_end_date',
'value' => $end_date,
'compare' => '<',
'type' => 'NUMERIC',
],
],
],
'limit' => -1,
'post_status' => 'publish',
], $start_date, $end_date, $data );
$events = $event_controller->get_events_post_data( $query );
3.Fetching Venue Details:To fetch venue details, you can use the ep_get_venue_by_id method of the Eventprime_Basic_Functions class as follows:
$ep_basic_functions = new Eventprime_Basic_Functions();
$venue_details = $ep_basic_functions->ep_get_venue_by_id($venue_id);
This approach will ensure that your code remains functional with the updated version of EventPrime.
If you have any further questions, please don’t hesitate to reach out to us.