forked from woocommerce/woocommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclass-wc-integrations.php
54 lines (44 loc) · 976 Bytes
/
class-wc-integrations.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* WooCommerce Integrations class
*
* Loads Integrations into WooCommerce.
*
* @class WC_Integrations
* @version 2.3.0
* @package WooCommerce/Classes/Integrations
* @category Class
* @author WooThemes
*/
class WC_Integrations {
/**
* Array of integrations.
*
* @var array
*/
public $integrations = array();
/**
* Initialize integrations.
*/
public function __construct() {
do_action( 'woocommerce_integrations_init' );
$load_integrations = apply_filters( 'woocommerce_integrations', array() );
// Load integration classes
foreach ( $load_integrations as $integration ) {
$load_integration = new $integration();
$this->integrations[ $load_integration->id ] = $load_integration;
}
}
/**
* Return loaded integrations.
*
* @access public
* @return array
*/
public function get_integrations() {
return $this->integrations;
}
}