forked from wpcodefactory/popup-notices-for-woocommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup-notices-for-woocommerce.php
38 lines (34 loc) · 1.07 KB
/
popup-notices-for-woocommerce.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
<?php
/**
* Plugin Name: Pop-up Notices for WooCommerce
* Plugin URI: https://wordpress.org/plugins/popup-notices-for-woocommerce
* Description: Turn your WooCommerce Notices into Popups
* Version: 1.1.8
* Author: Thanks to IT
* Author URI: https://github.com/thanks-to-it
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: popup-notices-for-woocommerce
* Domain Path: /src/languages
* WC requires at least: 3.0.0
* WC tested up to: 3.8
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
require_once "vendor/autoload.php";
// Check if WooCommerce is active
$plugin = 'woocommerce/woocommerce.php';
if (
! in_array( $plugin, apply_filters( 'active_plugins', get_option( 'active_plugins', array() ) ) ) &&
! ( is_multisite() && array_key_exists( $plugin, get_site_option( 'active_sitewide_plugins', array() ) ) )
) {
return;
}
$plugin = \ThanksToIT\PNWC\Core::instance();
$plugin->setup( array(
'path' => __FILE__
) );
if ( true === apply_filters( 'ttt_pnwc_init', true ) ) {
$plugin->init();
}