| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Plugin Name: ParcelWILL Order Tracking for WooCommerce |
| 5 |
* Plugin URI: https://docs.parcelpanel.com/woocommerce |
| 6 |
* Description: The best order tracking plugin specially designed for WooCommerce, driving customer loyalty and more sales by providing the best post-purchase experience. |
| 7 |
* Version: 4.5.5 |
| 8 |
* Author: ParcelWILL |
| 9 |
* Author URI: https://www.parcelpanel.com |
| 10 |
* Developer: ParcelWILL |
| 11 |
* Developer URI: https://www.parcelpanel.com |
| 12 |
* Text Domain: parcelpanel |
| 13 |
* Domain Path: /l10n/languages/ |
| 14 |
* License: GPL-2.0 |
| 15 |
* Requires PHP: 7.2 |
| 16 |
* Requires at least: 5.8 |
| 17 |
* WC requires at least: 4.4.0 |
| 18 |
* WC tested up to: 10.4 |
| 19 |
* |
| 20 |
* @copyright 2018-2026 ParcelWILL |
| 21 |
*/ |
| 22 |
|
| 23 |
define('ParcelPanel\VERSION', '4.5.5'); |
| 24 |
define('ParcelPanel\DB_VERSION', '2.9.0'); |
| 25 |
|
| 26 |
define('ParcelPanel\PLUGIN_FILE', __FILE__); |
| 27 |
define('ParcelPanel\PLUGIN_PATH', untrailingslashit(plugin_dir_path(__FILE__))); |
| 28 |
|
| 29 |
defined('ParcelPanel\DEBUG') || define('ParcelPanel\DEBUG', false); |
| 30 |
|
| 31 |
if ( is_multisite() ) { |
| 32 |
// In a multisite environment, check the activated plugins for the current site |
| 33 |
$active_plugins = get_site_option('active_sitewide_plugins'); // Get the global activation plugin |
| 34 |
$is_woocommerce_active = isset($active_plugins['woocommerce/woocommerce.php']); |
| 35 |
} else { |
| 36 |
// In a single-site environment, check the currently activated plugins |
| 37 |
$active_plugins = apply_filters('active_plugins', get_option('active_plugins')); |
| 38 |
$is_woocommerce_active = in_array('woocommerce/woocommerce.php', $active_plugins); |
| 39 |
} |
| 40 |
|
| 41 |
// Check if WooCommerce is activated |
| 42 |
if ($is_woocommerce_active) { |
| 43 |
|
| 44 |
include __DIR__ . '/vendor/autoload.php'; |
| 45 |
|
| 46 |
ParcelPanel\ParcelPanel::instance(); |
| 47 |
} |
| 48 |
|
| 49 |
// compatible with HPOS |
| 50 |
add_action('before_woocommerce_init', function () { |
| 51 |
if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) { |
| 52 |
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true); |
| 53 |
} |
| 54 |
}); |
| 55 |
|