{
    include_once ABSPATH . 'wp-admin/includes/plugin.php';
    if (is_plugin_active('woocommerce/woocommerce.php')) {
        return Marketplace::instance();
    } else {
        add_shortcode('marketplace', 'woocommerce_not_installed');
    }
}
function woocommerce_not_installed()
{
    echo '<div class="error"><p>' . sprintf(__('WooCommerce Marketplace depends on the last version of %s or later to work!', 'marketplace'), '<a href="http://www.woothemes.com/woocommerce/" target="_blank">' . __('WooCommerce 2.3', 'woocommerce-colors') . '</a>') . '</p></div>';
}
// Global for backwards compatibility.
$GLOBALS['marketplace'] = MP();
//seller approvement
$mp_obj = MP();
add_action('wp_ajax_nopriv_wk_admin_seller_approve', array($mp_obj, 'wk_admin_seller_approve'));
add_action('wp_ajax_wk_admin_seller_approve', array($mp_obj, 'wk_admin_seller_approve'));
// selller approvement end
//sku
add_action('wp_ajax_nopriv_product_sku_validation', array($mp_obj, 'product_sku_validation'));
add_action('wp_ajax_product_sku_validation', array($mp_obj, 'product_sku_validation'));
//sku
//get product_id with sku
add_action('wp_ajax_nopriv_mp_get_product_by_sku', array($mp_obj, 'mp_get_product_by_sku'));
add_action('wp_ajax_mp_get_product_by_sku', array($mp_obj, 'mp_get_product_by_sku'));
//end
//image gallary
add_action('wp_ajax_nopriv_productgallary_image_delete', array($mp_obj, 'productgallary_image_delete'));
add_action('wp_ajax_productgallary_image_delete', array($mp_obj, 'productgallary_image_delete'));
//image gallary
         * Delete subscribe table when multisite blog is deleted
         *
         * @since 1.0.7
         * @global $wpdb
         * @return void
         */
        public function delete_subscribe_table_mu($tables)
        {
            global $wpdb;
            $tables[] = $wpdb->prefix . 'maintenance_page';
            return $tables;
        }
    }
}
/**
 * The main function responsible for returning the one true Maintenance_Page
 * Instance to functions everywhere.
 *
 * Use this function like you would a global variable, except without needing
 * to declare the global.
 *
 * @since 1.0
 * @return object The one true Maintenance_Page Instance
 */
function MP()
{
    return Maintenance_Page::getInstance();
}
// Get mp Running
MP();
 public function add_scripts()
 {
     wp_enqueue_script('jquery-postmessage', MP()->plugin_url() . '/assets/js/jquery.ba-postmessage.min.js', array('jquery'), MP_VERSION, true);
     wp_enqueue_script('mp-scripts', MP()->plugin_url() . '/assets/js/main.js', array('jquery', 'jquery-postmessage'), MP_VERSION, true);
 }