mage-eventpress/woocommerce-event-press.php

48 lines
1.6 KiB
PHP
Raw Normal View History

2019-04-10 07:36:55 -04:00
<?php
/**
2021-11-24 02:25:25 -05:00
* Plugin Name: Event Manager and Tickets Selling Plugin for WooCommerce
2020-05-24 04:17:41 -04:00
* Plugin URI: http://mage-people.com
* Description: A Complete Event Solution for WordPress by MagePeople..
2022-03-25 02:56:18 -04:00
* Version: 3.6.0
2020-05-24 04:17:41 -04:00
* Author: MagePeople Team
* Author URI: http://www.mage-people.com/
* Text Domain: mage-eventpress
* Domain Path: /languages/
2020-07-12 06:42:13 -04:00
* WC requires at least: 3.0.9
2021-10-29 17:14:29 -04:00
* WC tested up to: 5.8
2020-05-24 04:17:41 -04:00
*/
2019-04-10 07:36:55 -04:00
2020-05-24 04:17:41 -04:00
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
2020-05-24 04:17:41 -04:00
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
if (is_plugin_active('woocommerce/woocommerce.php')) {
2020-08-05 08:06:45 -04:00
function appsero_init_tracker_mage_eventpress()
{
if (!class_exists('Appsero\Client')) {
2020-07-20 06:01:44 -04:00
require_once __DIR__ . '/lib/appsero/src/Client.php';
}
2021-10-29 17:14:29 -04:00
$client = new Appsero\Client('08cd627c-4ed9-49cf-a9b5-1536ec384a5a', 'Event Manager For Woocommerce ', __FILE__);
2020-07-20 06:01:44 -04:00
$client->insights()->init();
2020-08-05 08:06:45 -04:00
}
function mep_event_activation_redirect($plugin)
{
if ($plugin == plugin_basename(__FILE__)) {
exit(wp_redirect(admin_url('edit.php?post_type=mep_events&page=mep_event_welcome_page')));
}
}
add_action('activated_plugin', 'mep_event_activation_redirect');
2020-02-05 07:47:07 -05:00
require_once(dirname(__FILE__) . "/inc/mep_file_include.php");
2020-05-24 04:17:41 -04:00
} else {
function mep_admin_notice_wc_not_active()
{
$class = 'notice notice-error';
2019-04-10 07:36:55 -04:00
printf(
'<div class="error" style="background:red; color:#fff;"><p>%s</p></div>',
2021-10-29 17:14:29 -04:00
__('You Must Install WooCommerce Plugin before activating Event Manager For Woocommerce , Becuase It is dependent on Woocommerce Plugin')
2019-04-10 07:36:55 -04:00
);
2020-05-24 04:17:41 -04:00
}
add_action('admin_notices', 'mep_admin_notice_wc_not_active');
2022-01-12 23:50:00 -05:00
}