PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.3.0
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.3.0
3.3.0 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.1 trunk 1.0.4 1.1.0 1.1.0.1 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 All 162 releases
cartflows / modules / webhook / class-cartflows-webhook-loader.php

class-cartflows-webhook-loader.php in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 3.3.0, at modules/webhook/class-cartflows-webhook-loader.php

70 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * CartFlows Webhook Module Loader.
4 *
5 * @package CartFlows
6 */
7
8 // Exit if accessed directly.
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 if ( ! class_exists( 'Cartflows_Webhook_Loader' ) ) {
14
15 /**
16 * Class Cartflows_Webhook_Loader.
17 */
18 class Cartflows_Webhook_Loader {
19
20 /**
21 * Member Variable
22 *
23 * @var instance
24 */
25 private static $instance = null;
26
27 /**
28 * Initiator
29 *
30 * @return object initialized object of class.
31 */
32 public static function get_instance() {
33 if ( is_null( self::$instance ) ) {
34 self::$instance = new self();
35 }
36 return self::$instance;
37 }
38
39 /**
40 * Constructor
41 */
42 public function __construct() {
43 $this->define_constants();
44 $this->load_files();
45 }
46
47 /**
48 * Define webhook module constants.
49 */
50 private function define_constants() {
51 define( 'CARTFLOWS_WEBHOOK_DIR', plugin_dir_path( __FILE__ ) );
52 }
53
54 /**
55 * Load module files.
56 */
57 private function load_files() {
58 include_once CARTFLOWS_WEBHOOK_DIR . 'classes/class-cartflows-webhook-manager.php';
59 include_once CARTFLOWS_WEBHOOK_DIR . 'classes/class-cartflows-webhook-payload.php';
60 include_once CARTFLOWS_WEBHOOK_DIR . 'classes/class-cartflows-webhook-dispatcher.php';
61 include_once CARTFLOWS_WEBHOOK_DIR . 'classes/class-cartflows-webhook-events.php';
62
63 // Instantiate dispatcher so AS hook is always registered.
64 Cartflows_Webhook_Dispatcher::get_instance();
65 }
66 }
67
68 Cartflows_Webhook_Loader::get_instance();
69 }
70