function simplepay_tab_license_keys()
{
    global $sc_options;
    $main_license_key = $sc_options->get_setting_value('main_license_key');
    $main_license_status = get_option('simplepay_main_license_status');
    $main_license_error = get_option('simplepay_main_license_error');
    ?>

	<div class="tab-content sc-admin-hidden" id="license-keys-settings-tab">
		<div>
			<?php 
    $sc_options->description(__('Your license key is used for access to automatic upgrades and premium support.', 'stripe'));
    ?>
		</div>

		<div>
			<label for="<?php 
    echo esc_attr($main_license_key);
    ?>
">
				<?php 
    echo Stripe_Checkout_Pro::get_plugin_title() . ' ' . __('License Key', 'stripe');
    ?>
			</label>

			<?php 
    $sc_options->license_key('main_license_key', $main_license_status, $main_license_error);
    ?>
		</div>

		<?php 
    do_action('sc_settings_tab_license');
    ?>
	</div>

	<?php 
}
global $sc_options;
?>

<!-- License Keys tab HTML -->
<div class="sc-admin-hidden" id="license-keys-settings-tab">
	<div>
		<?php 
$sc_options->description(__('These license keys are used for access to automatic upgrades and support.', 'sc'));
?>
	</div>

	<div>
		<label for="<?php 
echo esc_attr($sc_options->get_setting_id('pro_license_key'));
?>
">
			<?php 
printf(__('%1$s License Key', 'sc'), Stripe_Checkout_Pro::get_plugin_title());
?>
		</label>
		
		<?php 
$sc_options->license_field('sc_license_key', Stripe_Checkout_Pro::get_plugin_title());
?>
	</div>
	
	<?php 
do_action('sc_settings_tab_license');
?>
</div>
if (!defined('SC_DIR_URL')) {
    define('SC_DIR_URL', plugin_dir_url(__FILE__));
}
// Plugin root file
// TODO SIMPAY_PLUGIN_FILE
if (!defined('SC_PLUGIN_FILE')) {
    define('SC_PLUGIN_FILE', __FILE__);
}
// Base URL
// TODO SIMPAY_BASE_URL
if (!defined('SC_WEBSITE_BASE_URL')) {
    define('SC_WEBSITE_BASE_URL', 'https://wpsimplepay.com/');
}
// Plugin requirements class.
require_once 'classes/wp-requirements.php';
// Check plugin requirements before loading plugin.
$this_plugin_checks = new SimPay_WP_Requirements('WP Simple Pay Pro for Stripe', plugin_basename(__FILE__), array('PHP' => '5.3.3', 'WordPress' => '4.2', 'Extensions' => array('curl', 'json', 'mbstring')));
if ($this_plugin_checks->pass() === false) {
    $this_plugin_checks->halt();
    return;
}
// Load the plugin main class (and base class before it).
require_once SC_DIR_PATH_PRO . 'classes/class-stripe-checkout-shared.php';
require_once SC_DIR_PATH_PRO . 'classes/class-stripe-checkout-pro.php';
// Register hook that is fired when the plugin is activated.
register_activation_hook(SC_PLUGIN_FILE, array('Stripe_Checkout_Pro', 'activate'));
// Create a global instance of our main class for this plugin so we can use it throughout all the other classes.
global $base_class;
// Let's get going finally!
$base_class = Stripe_Checkout_Pro::get_instance();
 /**
  * Return an instance of this class.
  *
  * @since     2.0.0
  *
  * @return    object    A single instance of this class.
  */
 public static function get_instance()
 {
     // If the single instance hasn't been set, set it now.
     if (null == self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
        function stripe_checkout_plugin_extensions()
        {
            $required = unserialize(SC_REQUIRES);
            $extensions = '<code>' . implode(', ', $required['ext']) . '</code>';
            echo '<div class="error"><p>' . sprintf(__('WP Simple Pay Pro requires the following PHP extensions to work: %s. Please make sure they are installed or contact your host.', 'sc'), $extensions) . '</p></div>';
        }
        add_action('admin_notices', 'stripe_checkout_plugin_extensions');
    }
    // Halt the rest of the plugin execution if PHP check fails or extensions not found.
    if (isset($stripe_checkout_fails['php']) || isset($stripe_checkout_fails['ext'])) {
        return;
    }
}
// Include main class files.
require_once SC_DIR_PATH_PRO . 'classes/class-stripe-checkout.php';
require_once SC_DIR_PATH_PRO . 'classes/class-stripe-checkout-pro.php';
// Create a global instance of our main class for this plugin so we can use it throughout all the other classes
global $base_class;
$base_class = Stripe_Checkout_Pro::get_instance();
// Register hook that is fired when the plugin is activated.
register_activation_hook(SC_MAIN_FILE, array('Stripe_Checkout_Pro', 'activate'));
include_once ABSPATH . 'wp-admin/includes/plugin.php';
if (is_plugin_active('stripe-subscriptions/stripe-subscriptions.php')) {
    // Plugin is activated.
    if (false === get_option('sc_sub_initialized')) {
        deactivate_plugins('stripe-subscriptions/stripe-subscriptions.php');
        wp_die(sprintf(__('There was an issue reactivating Stripe Subscriptions, please visit the <a href="%s">plugins page</a> to activate it manually.', 'sc'), get_admin_url('', 'plugins.php')));
    }
}
Stripe_Checkout_Pro::get_instance();
        /**
         * Display admin notice for invalid or missing license key.
         */
        public function invalid_license_key_notice()
        {
            global $sc_options;
            $main_license_key = $sc_options->get_setting_value('main_license_key');
            $main_license_status = get_option('simplepay_main_license_status');
            $simplepay_admin = Stripe_Checkout_Admin::get_instance();
            if ($simplepay_admin->viewing_this_plugin() && (empty($main_license_key) || 'valid' !== $main_license_status)) {
                ?>
				<div class="error notice">
					<p>
						<?php 
                _e('Your WP Simple Pay Pro license key is invalid, inactive or missing. Valid license keys are required for access to automatic upgrades and premium support.', 'stripe');
                ?>
						<br />
						<?php 
                // Show "below" message unless on licenses tab.
                if (!(isset($_GET['tab']) && 'licenses' == $_GET['tab'])) {
                    // Render link to Support tab on other plugin tabs.
                    echo '<a class="simple-pay-licenses-tab-link" href="' . esc_url(add_query_arg(array('page' => Stripe_Checkout_Pro::get_plugin_slug()), admin_url('admin.php'))) . '#license-keys">' . __('Go to the licenses page.', 'stripe') . '</a>' . "\n";
                }
                ?>
					</p>
				</div>
				<?php 
            }
        }
<?php

/**
 * Show admin license key notice if Lite or the old legacy plugins are detected.
 */
// Exit if accessed directly.
if (!defined('ABSPATH')) {
    exit;
}
?>

<style>
	#sc-lite-legacy-notice .button-primary,
	#sc-lite-legacy-notice .button-secondary {
		margin: 2px 0;
	}
</style>

<div id="sc-lite-legacy-notice" class="error">
	<p>
		<?php 
// Check for empty key first.
echo '<strong>' . sprintf(__('Notice: You have %1$s or a legacy add-on installed. Please deactivate the plugin(s) to avoid conflicts with %2$s.', 'sc'), Stripe_Checkout::get_plugin_title(), Stripe_Checkout_Pro::get_plugin_title()) . '</strong>' . "\n";
?>
	</p>
</div>