-
Notifications
You must be signed in to change notification settings - Fork 3
/
wc-plugin-update-server.php
47 lines (41 loc) · 1.18 KB
/
wc-plugin-update-server.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* Plugin Name: WC PUS integration
* Plugin URI: http://rwsite.ru
* Description: WooCommerce and WP Packages Update Server integration
* Version: 1.0.9
* Author: Aleksei Tikhomirov
* Author URI: http://rwsite.ru
* Text Domain: wc-pus
* Domain Path: /languages
*
* Tested up to: 6.4.3
* Requires at least: 5.6
* Requires PHP: 7.4+
*
* WC requires at least: 6.0
* WC tested up to: 8.4.0
*
*
* @author <[email protected]>
* @copyright Copyright (c) Aleksei Tikhomirov
* @license http://www.gnu.org/licenses/gpl-3.0.html
*
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( class_exists( 'LicPlugin' ) || defined( 'WCPUS' ) ) {
return;
}
define( 'WCPUS', __FILE__ );
spl_autoload_register( function ( $className ) {
$path = realpath( __DIR__ . '/includes/' . strtr( $className, '/', DIRECTORY_SEPARATOR ) . '.php' );
if ( is_readable( $path ) ) {
include_once $path;
}
} );
register_activation_hook( __FILE__, [ 'LicPlugin', 'activation' ] );
register_uninstall_hook( __FILE__, [ 'LicPlugin', 'uninstall' ] );
add_action( 'plugins_loaded', [ 'LicPlugin', 'getInstance' ], 20 );