Skip to content

Commit 8da3f72

Browse files
committed
v2.0.0
0 parents  commit 8da3f72

8 files changed

+1400
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?php
2+
/*
3+
Plugin Name: Cross-sells Manager for WooCommerce
4+
Plugin URI: https://wordpress.org/plugins/cross-sells-manager-for-woocommerce/
5+
Description: Customize WooCommerce cross-sells products display. Beautifully.
6+
Version: 2.0.0
7+
Author: Algoritmika Ltd
8+
Author URI: https://profiles.wordpress.org/algoritmika/
9+
Requires at least: 4.4
10+
Text Domain: cross-sells-manager-for-woocommerce
11+
Domain Path: /langs
12+
WC tested up to: 9.9
13+
Requires Plugins: woocommerce
14+
License: GNU General Public License v3.0
15+
License URI: http://www.gnu.org/licenses/gpl-3.0.html
16+
*/
17+
18+
defined( 'ABSPATH' ) || exit;
19+
20+
if ( 'cross-sells-manager-for-woocommerce.php' === basename( __FILE__ ) ) {
21+
/**
22+
* Check if Pro plugin version is activated.
23+
*
24+
* @version 2.0.0
25+
* @since 1.3.0
26+
*/
27+
$plugin = 'cross-sells-manager-for-woocommerce-pro/cross-sells-manager-for-woocommerce-pro.php';
28+
if (
29+
in_array( $plugin, (array) get_option( 'active_plugins', array() ), true ) ||
30+
(
31+
is_multisite() &&
32+
array_key_exists( $plugin, (array) get_site_option( 'active_sitewide_plugins', array() ) )
33+
)
34+
) {
35+
defined( 'ALG_WC_CROSS_SELLS_MANAGER_FILE_FREE' ) || define( 'ALG_WC_CROSS_SELLS_MANAGER_FILE_FREE', __FILE__ );
36+
return;
37+
}
38+
}
39+
40+
defined( 'ALG_WC_CROSS_SELLS_MANAGER_VERSION' ) || define( 'ALG_WC_CROSS_SELLS_MANAGER_VERSION', '2.0.0' );
41+
42+
defined( 'ALG_WC_CROSS_SELLS_MANAGER_FILE' ) || define( 'ALG_WC_CROSS_SELLS_MANAGER_FILE', __FILE__ );
43+
44+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-alg-wc-cross-sells-manager.php';
45+
46+
if ( ! function_exists( 'alg_wc_cross_sells_manager' ) ) {
47+
/**
48+
* Returns the main instance of Alg_WC_Cross_Sells_Manager to prevent the need to use globals.
49+
*
50+
* @version 1.0.0
51+
* @since 1.0.0
52+
*/
53+
function alg_wc_cross_sells_manager() {
54+
return Alg_WC_Cross_Sells_Manager::instance();
55+
}
56+
}
57+
58+
add_action( 'plugins_loaded', 'alg_wc_cross_sells_manager' );

0 commit comments

Comments
 (0)