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>
<?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>