forked from woocommerce/wc-smooth-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwc-smooth-generator.php
52 lines (44 loc) · 1.11 KB
/
wc-smooth-generator.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
48
49
50
51
52
<?php
/**
* Plugin Name: WooCommerce Smooth Generator
* Plugin URI: https://woocommerce.com/
* Description: A smooth customer, order and product generator for WooCommerce.
* Version: 1.0.4
* Author: Automattic
* Author URI: https://woocommerce.com
*
* Tested up to: 5.7
* Requires PHP: 8.0.2
* WC requires at least: 5.0.0
* WC tested up to: 6.0.0
* Woo: 000000:0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0
*
* @package WooCommerce
*/
defined( 'ABSPATH' ) || exit;
require_once __DIR__ . '/includes/GenerateBackgroundProcess.php';
// autoloader.
if ( ! class_exists( \WC\SmoothGenerator\Plugin::class ) ) {
require __DIR__ . '/vendor/autoload.php';
}
/**
* Fetch instance of plugin.
*
* @return \WC\SmoothGenerator\Plugin
*/
function wc_smooth_generator() {
static $instance;
if ( is_null( $instance ) ) {
$instance = new \WC\SmoothGenerator\Plugin( __FILE__ );
}
return $instance;
}
/**
* Init plugin when WordPress loads.
*/
function load_wc_smooth_generator() {
wc_smooth_generator();
}
if ( version_compare( PHP_VERSION, '5.3', '>' ) ) {
add_action( 'plugins_loaded', 'load_wc_smooth_generator', 20 );
}