Improved module customization
This commit is contained in:
parent
84d36f7c33
commit
a29835d6fc
@ -13,11 +13,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Retailcrm_Request' ) ) {
|
if ( ! class_exists( 'WC_Retailcrm_Request' ) ) {
|
||||||
include_once( __DIR__ . '/class-wc-retailcrm-request.php' );
|
include_once(WC_Integration_Retailcrm::checkCustomFile('include/api/class-wc-retailcrm-request.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Retailcrm_Response' ) ) {
|
if ( ! class_exists( 'WC_Retailcrm_Response' ) ) {
|
||||||
include_once( __DIR__ . '/class-wc-retailcrm-response.php' );
|
include_once(WC_Integration_Retailcrm::checkCustomFile('include/api/class-wc-retailcrm-response.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
class WC_Retailcrm_Client_V4
|
class WC_Retailcrm_Client_V4
|
||||||
|
@ -13,11 +13,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Retailcrm_Request' ) ) {
|
if ( ! class_exists( 'WC_Retailcrm_Request' ) ) {
|
||||||
include_once( __DIR__ . '/class-wc-retailcrm-request.php' );
|
include_once(WC_Integration_Retailcrm::checkCustomFile('include/api/class-wc-retailcrm-request.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Retailcrm_Response' ) ) {
|
if ( ! class_exists( 'WC_Retailcrm_Response' ) ) {
|
||||||
include_once( __DIR__ . '/class-wc-retailcrm-response.php' );
|
include_once(WC_Integration_Retailcrm::checkCustomFile('include/api/class-wc-retailcrm-response.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
class WC_Retailcrm_Client_V5
|
class WC_Retailcrm_Client_V5
|
||||||
|
@ -22,7 +22,7 @@ if ( ! class_exists( 'WC_Retailcrm_Proxy' ) ) :
|
|||||||
$this->corporateEnabled = $corporateEnabled;
|
$this->corporateEnabled = $corporateEnabled;
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Retailcrm_Client_V5' ) ) {
|
if ( ! class_exists( 'WC_Retailcrm_Client_V5' ) ) {
|
||||||
include_once( __DIR__ . '/class-wc-retailcrm-client-v5.php' );
|
include_once(WC_Integration_Retailcrm::checkCustomFile('include/api/class-wc-retailcrm-client-v5.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->retailcrm = new WC_Retailcrm_Client_V5($api_url, $api_key, 'v5');
|
$this->retailcrm = new WC_Retailcrm_Client_V5($api_url, $api_key, 'v5');
|
||||||
|
@ -12,11 +12,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Retailcrm_Exception_Curl' ) ) {
|
if ( ! class_exists( 'WC_Retailcrm_Exception_Curl' ) ) {
|
||||||
include_once( __DIR__ . '/class-wc-retailcrm-exception-curl.php' );
|
include_once(WC_Integration_Retailcrm::checkCustomFile('include/api/class-wc-retailcrm-exception-curl.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Retailcrm_Response' ) ) {
|
if ( ! class_exists( 'WC_Retailcrm_Response' ) ) {
|
||||||
include_once( __DIR__ . '/class-wc-retailcrm-response.php' );
|
include_once(WC_Integration_Retailcrm::checkCustomFile('include/api/class-wc-retailcrm-response.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
class WC_Retailcrm_Request
|
class WC_Retailcrm_Request
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Retailcrm_Exception_Json' ) ) {
|
if ( ! class_exists( 'WC_Retailcrm_Exception_Json' ) ) {
|
||||||
include_once( __DIR__ . '/class-wc-retailcrm-exception-json.php' );
|
include_once(WC_Integration_Retailcrm::checkCustomFile('include/api/class-wc-retailcrm-exception-json.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
if (!class_exists('WC_Retailcrm_Base')) {
|
if (!class_exists('WC_Retailcrm_Base')) {
|
||||||
if (!class_exists('WC_Retailcrm_Abstracts_Settings')) {
|
if (!class_exists('WC_Retailcrm_Abstracts_Settings')) {
|
||||||
include_once 'abstracts/class-wc-retailcrm-abstracts-settings.php';
|
include_once(WC_Integration_Retailcrm::checkCustomFile('include/abstracts/class-wc-retailcrm-abstracts-settings.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -46,7 +46,7 @@ if (!class_exists('WC_Retailcrm_Base')) {
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
if (!class_exists( 'WC_Retailcrm_Proxy')) {
|
if (!class_exists( 'WC_Retailcrm_Proxy')) {
|
||||||
include_once(__DIR__ . '/api/class-wc-retailcrm-proxy.php');
|
include_once(WC_Integration_Retailcrm::checkCustomFile('include/api/class-wc-retailcrm-proxy.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($retailcrm === false) {
|
if ($retailcrm === false) {
|
||||||
|
@ -60,11 +60,11 @@ class WC_Retailcrm_Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!class_exists('WC_Retailcrm_Icml')) {
|
if (!class_exists('WC_Retailcrm_Icml')) {
|
||||||
require_once (dirname(__FILE__) . '/class-wc-retailcrm-icml.php');
|
require_once(WC_Integration_Retailcrm::checkCustomFile('include/class-wc-retailcrm-icml.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!class_exists('WC_Retailcrm_Base')) {
|
if (!class_exists('WC_Retailcrm_Base')) {
|
||||||
require_once (dirname(__FILE__) . '/class-wc-retailcrm-base.php');
|
require_once(WC_Integration_Retailcrm::checkCustomFile('include/class-wc-retailcrm-base.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$retailcrm_icml = new WC_Retailcrm_Icml();
|
$retailcrm_icml = new WC_Retailcrm_Icml();
|
||||||
|
@ -271,10 +271,7 @@ class WC_Retailcrm_History_Assembler
|
|||||||
private static function getMappingValues($groupFilter = array())
|
private static function getMappingValues($groupFilter = array())
|
||||||
{
|
{
|
||||||
$fields = array();
|
$fields = array();
|
||||||
$mappingFile = realpath(implode(
|
$mappingFile = realpath(WC_Integration_Retailcrm::checkCustomFile('config/objects.xml'));
|
||||||
DIRECTORY_SEPARATOR,
|
|
||||||
array(__DIR__, '..', '..', 'config', 'objects.xml')
|
|
||||||
));
|
|
||||||
|
|
||||||
if (file_exists($mappingFile)) {
|
if (file_exists($mappingFile)) {
|
||||||
$objects = simplexml_load_file($mappingFile);
|
$objects = simplexml_load_file($mappingFile);
|
||||||
|
@ -195,7 +195,7 @@ if (!class_exists( 'WC_Integration_Retailcrm')) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!class_exists('WC_Retailcrm_Plugin')) {
|
if (!class_exists('WC_Retailcrm_Plugin')) {
|
||||||
require_once (dirname(__FILE__) . '/include/class-wc-retailcrm-plugin.php');
|
require_once(WC_Integration_Retailcrm::checkCustomFile('include/class-wc-retailcrm-plugin.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$plugin = WC_Retailcrm_Plugin::getInstance(__FILE__);
|
$plugin = WC_Retailcrm_Plugin::getInstance(__FILE__);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user