1 <?php
 2 /**
 3  * WooCommerce Integrations class
 4  *
 5  * Loads Integrations into WooCommerce.
 6  *
 7  * @class       WC_Integrations
 8  * @version     2.0.0
 9  * @package     WooCommerce/Classes/Integrations
10  * @category    Class
11  * @author      WooThemes
12  */
13 class WC_Integrations {
14 
15     /** @var array Array of integration classes */
16     var $integrations = array();
17 
18     /**
19      * __construct function.
20      *
21      * @access public
22      * @return void
23      */
24     public function __construct() {
25 
26         do_action( 'woocommerce_integrations_init' );
27 
28         $load_integrations = apply_filters( 'woocommerce_integrations', array() );
29 
30         // Load integration classes
31         foreach ( $load_integrations as $integration ) {
32 
33             $load_integration = new $integration();
34 
35             $this->integrations[ $load_integration->id ] = $load_integration;
36         }
37 
38     }
39 
40     /**
41      * Return loaded integrations.
42      *
43      * @access public
44      * @return array
45      */
46     public function get_integrations() {
47         return $this->integrations;
48     }
49 }
50 
WooCommerce API documentation generated by ApiGen 2.8.0