<?php
/*
Plugin Name: Woocommerce Email Customizer PRO 
Plugin URI:  http://monsart.ent/
Description: Custom Email Templates for Woocommerce
Version:     1.2.1
Author:      پرشین اسکریپت
Author URI:  http://persianscript.ir/
*/


define('MA_PLUGIN_PREFIX', "MA");
define('MA_PLUGIN_NAME', 'WCEC-PRO');
define('MA_DEVELOPER_MODE', false);
if(!defined('DS')){
    define('DS', DIRECTORY_SEPARATOR);
}

define('MA_PLUGIN_VERION', '1.0.0');
define('MA_PLUGIN_FOLDER_NAME', 'woocommerce-email-customizer-pro');
define('MA_ROOT', dirname(__FILE__) . DS);
define('MA_INCLUDES', MA_ROOT .  'includes' . DS);
define('MA_VIEW_PATH',  MA_INCLUDES . 'views' . DS );
define("MA_ASSETS", plugins_url(MA_PLUGIN_FOLDER_NAME) . '/assets/');
define('MA_IMAGES', MA_ASSETS . '/images/');

require_once MA_INCLUDES .'MaSinglton.php';
require_once MA_INCLUDES . 'MaBootstrap.php';
require_once MA_INCLUDES . 'MaTemplateEngine.php';

require_once MA_INCLUDES .'MaApplication.php';
require_once MA_INCLUDES .  'utils' .  DS . 'CaseInsensitiveArray.php';
require_once MA_INCLUDES .  'utils' .  DS . 'Curl.php';

require_once MA_INCLUDES . 'MaConfig.php';
require_once MA_INCLUDES . 'MaAssetManager.php';
require_once MA_INCLUDES . 'MaViewHelper.php';
require_once MA_INCLUDES . 'MaEmail.php';



$bootstrap =  MaBootstrap::getInstance();
$bootstrap->init();


register_activation_hook( __FILE__, 'ma_plugin_activate' );

function ma_plugin_activate(){
    global $wpdb, $wp_version;
    $wpdb->query("DELETE FROM `{$wpdb->prefix}options` WHERE `option_name` LIKE '%wcec-pro-order%'");
}


