PluginProbe ʕ •ᴥ•ʔ
Bopo – WooCommerce Product Bundle Builder / trunk
Bopo – WooCommerce Product Bundle Builder vtrunk
bopo-woo-product-bundle-builder / bopo-woo-product-bundle-builder.php
bopo-woo-product-bundle-builder Last commit date
admin 2 weeks ago assets 4 years ago css 1 week ago frontend 2 months ago includes 2 months ago js 2 weeks ago languages 2 months ago templates 4 years ago bopo-woo-product-bundle-builder.php 1 week ago changelog.txt 1 week ago readme.txt 1 week ago
bopo-woo-product-bundle-builder.php
104 lines
1 <?php
2 /**
3 * Plugin Name: Bopo - WooCommerce Product Bundle Builder
4 * Plugin URI: https://villatheme.com/extensions/bopo-woocommerce-product-bundle-builder/
5 * Description: Create irresistible bundle products for WooCommerce, offering flexible pricing and great deals for your customers
6 * Version: 1.2.2
7 * Author: VillaTheme
8 * Author URI: http://villatheme.com
9 * License: GPL v2 or later
10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
11 * Text Domain: woo-bopo-bundle
12 * Domain Path: /languages
13 * Copyright 2022-2026 VillaTheme.com. All rights reserved.
14 * Requires Plugins: woocommerce
15 * Requires at least: 6.2
16 * Tested up to: 7.0
17 * WC requires at least: 7.0
18 * WC tested up to: 10.8
19 * Requires PHP: 7.4
20 */
21
22 defined('ABSPATH') || exit;
23 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
24
25 //Compatible with High-Performance order storage (COT)
26 add_action( 'before_woocommerce_init', function () {
27 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
28 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true);
29 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('cart_checkout_blocks', __FILE__, true);
30 }
31 } );
32 if (is_plugin_active('bopo-woocommerce-product-bundle-builder/bopo-woocommerce-product-bundle-builder.php')) {
33 return;
34 }
35 if (!defined('VI_WOO_BOPO_BUNDLE_VERSION')) {
36 define('VI_WOO_BOPO_BUNDLE_VERSION', '1.2.2');
37 }
38
39 if (!class_exists('VI_WOO_BOPO_BUNDLE')) {
40 class VI_WOO_BOPO_BUNDLE {
41 public $plugin_name = 'Bopo - WooCommerce Product Bundle Builder';
42
43 public function __construct() {
44 // register_activation_hook( __FILE__, array( $this, 'install' ) );
45 // register_deactivation_hook( __FILE__, array( $this, 'uninstall' ) );
46
47 add_action('plugins_loaded', array($this, 'init'));
48
49 }
50
51
52 public function init() {
53 if (!function_exists('is_plugin_active')) {
54 require_once ABSPATH . 'wp-admin/includes/plugin.php';
55 }
56
57
58 if (!class_exists('VillaTheme_Require_Environment')) {
59 require_once WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . "bopo-woo-product-bundle-builder/includes/support.php";
60 }
61
62 $environment = new VillaTheme_Require_Environment([
63 'plugin_name' => $this->plugin_name,
64 'php_version' => '7.0',
65 'wp_version' => '5.0',
66 'require_plugins' => [
67 [
68 'slug' => 'woocommerce',
69 'name' => 'WooCommerce',
70 'defined_version' => 'WC_VERSION',
71 'version' => '7.0',
72 ],
73 ]
74 ]
75 );
76
77 if ($environment->has_error()) {
78 return;
79 }
80
81 $init_file = WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . "bopo-woo-product-bundle-builder" . DIRECTORY_SEPARATOR . "includes" . DIRECTORY_SEPARATOR . "includes.php";
82 require_once $init_file;
83 }
84
85 /**
86 * When active plugin Function will be call
87 */
88 public function install() {
89 global $wp_version;
90 if (version_compare($wp_version, "5.1", "<")) {
91 deactivate_plugins(basename(__FILE__)); // Deactivate our plugin
92 wp_die("This plugin requires WordPress version 5.1 or higher.");
93 }
94 }
95
96 /**
97 * When deActive function will be call
98 */
99 public function uninstall() {
100
101 }
102 }
103 }
104 new VI_WOO_BOPO_BUNDLE();