PluginProbe
Drip – Marketing Automation for WooCommerce / 1.1.10
Drip – Marketing Automation for WooCommerce v1.1.10
trunk 0.0.3 0.0.4 0.0.5 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.1.0 1.1.1 1.1.10 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9
drip / drip.php

drip.php in Drip – Marketing Automation for WooCommerce 1.1.10, at drip.php

64 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The starting point for the Drip WooCommerce plugin.
4 *
5 * @package Drip_Woocommerce
6 */
7
8 /*
9 Plugin Name: Drip for WooCommerce
10 Plugin URI: https://github.com/DripEmail/drip-woocommerce
11 Description: A WordPress plugin to connect to Drip's WooCommerce integration
12 Version: 1.1.10
13 Author: Drip
14 Author URI: https://www.drip.com/
15 License: GPLv2
16
17 WC requires at least: 3.0
18 WC tested up to: 11.0.1
19 */
20
21 defined( 'ABSPATH' ) || die( 'Executing outside of the WordPress context.' );
22
23 /**
24 * Check if WooCommerce is active (per-site or network-activated in multisite)
25 *
26 * @return bool
27 */
28 function drip_woocommerce_is_woocommerce_active() {
29 $active_plugins = (array) get_option( 'active_plugins', array() );
30 if ( is_multisite() ) {
31 $network_plugins = array_keys( (array) get_site_option( 'active_sitewide_plugins', array() ) );
32 $active_plugins = array_merge( $active_plugins, $network_plugins );
33 }
34
35 return in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', $active_plugins ), true );
36 }
37
38 // Enable HPOS compatibility.
39 add_action( 'before_woocommerce_init', function() {
40 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
41 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
42 }
43 } );
44
45 if ( drip_woocommerce_is_woocommerce_active() ) {
46 require_once __DIR__ . '/src/class-drip-woocommerce-settings.php';
47 require_once __DIR__ . '/src/class-drip-woocommerce-snippet.php';
48 require_once __DIR__ . '/src/class-drip-woocommerce-cart-events.php';
49 require_once __DIR__ . '/src/class-drip-woocommerce-view-events.php';
50 require_once __DIR__ . '/src/class-drip-woocommerce-version.php';
51 require_once __DIR__ . '/src/class-drip-woocommerce-customer-identify.php';
52 require_once __DIR__ . '/src/class-drip-woocommerce-checkout-marketing-confirmation.php';
53 require_once __DIR__ . '/src/class-drip-woocommerce-plugin-view.php';
54
55 Drip_Woocommerce_Settings::init();
56 Drip_Woocommerce_Snippet::init();
57 Drip_Woocommerce_Cart_Events::init();
58 Drip_Woocommerce_View_Events::init();
59 Drip_Woocommerce_Version::init();
60 Drip_Woocommerce_Customer_Identify::init();
61 Drip_Woocommerce_Checkout_Marketing_Confirmation::init();
62 Drip_Woocommerce_Plugin_View::init();
63 }
64