| Server IP : 109.234.162.214 / Your IP : 216.73.216.157 Web Server : Apache System : Linux servd162214.srv.odns.fr 4.18.0-372.26.1.lve.1.el8.x86_64 #1 SMP Fri Sep 16 14:08:19 EDT 2022 x86_64 User : carpe ( 1178) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/includes/ |
Upload File : |
<?php
/**
* Kkart Integrations class
*
* Loads Integrations into Kkart.
*
* @version 3.9.0
* @package Kkart\Classes\Integrations
*/
defined( 'ABSPATH' ) || exit;
/**
* Integrations class.
*/
class KKART_Integrations {
/**
* Array of integrations.
*
* @var array
*/
public $integrations = array();
/**
* Initialize integrations.
*/
public function __construct() {
do_action( 'kkart_integrations_init' );
$load_integrations = array(
//'KKART_Integration_MaxMind_Geolocation', // TODO: check class not find
);
$load_integrations = apply_filters( 'kkart_integrations', $load_integrations );
// Load integration classes.
foreach ( $load_integrations as $integration ) {
$load_integration = new $integration();
$this->integrations[ $load_integration->id ] = $load_integration;
}
}
/**
* Return loaded integrations.
*
* @return array
*/
public function get_integrations() {
return $this->integrations;
}
/**
* Return a desired integration.
*
* @since 3.9.0
* @param string $id The id of the integration to get.
* @return mixed|null The integration if one is found, otherwise null.
*/
public function get_integration( $id ) {
if ( isset( $this->integrations[ $id ] ) ) {
return $this->integrations[ $id ];
}
return null;
}
}