/**
  * Enqueue admin-specific style sheets for this plugin's admin pages only.
  *
  * @since     1.0.0
  */
 public function enqueue_admin_styles()
 {
     global $base_class;
     if (Stripe_Checkout_Admin::get_instance()->viewing_this_plugin()) {
         wp_enqueue_style($base_class->plugin_slug . '-toggle-switch', SC_DIR_URL . 'assets/css/vendor/toggle-switch' . $this->min . '.css', array(), $base_class->version);
         wp_enqueue_style($base_class->plugin_slug . '-admin-styles', SC_DIR_URL . 'assets/css/admin-main' . $this->min . '.css', array($base_class->plugin_slug . '-toggle-switch'), $base_class->version);
     }
     wp_enqueue_script($base_class->plugin_slug . '-admin', SC_DIR_URL . 'assets/js/admin-main' . $this->min . '.js', array('jquery'), $base_class->version, true);
 }
 /**
  * Enqueue Admin Styles
  *
  * @since 1.0.0
  */
 public function enqueue_admin_styles()
 {
     global $base_class;
     $css_dir = SC_DIR_URL . 'assets/css/';
     if (Stripe_Checkout_Admin::get_instance()->viewing_this_plugin()) {
         wp_register_style($base_class->plugin_slug . '-admin-lite', $css_dir . 'shared-admin-main' . $this->min . '.css', array(), $base_class->version);
         wp_enqueue_style($base_class->plugin_slug . '-admin-lite');
     }
 }
 /**
  * Show notice after plugin install/activate in admin dashboard.
  * Hide after first viewing.
  *
  * @since   1.0.0
  */
 public function admin_install_notice()
 {
     // Exit all of this is stored value is false/0 or not set.
     if (false == get_option('sc_show_admin_install_notice')) {
         return;
     }
     // Delete stored value if "hide" button click detected (custom querystring value set to 1).
     if (!empty($_REQUEST['sc-dismiss-install-nag']) || Stripe_Checkout_Admin::get_instance()->viewing_this_plugin()) {
         delete_option('sc_show_admin_install_notice');
         return;
     }
     // At this point show install notice. Show it only on the plugin screen.
     if ('plugins' == get_current_screen()->id) {
         include_once SC_DIR_PATH . 'views/admin-shared-notice-install.php';
     }
 }
 public function init()
 {
     Stripe_Checkout_Pro_Licenses::get_instance();
     Stripe_Checkout_Scripts::get_instance();
     Stripe_Checkout_Shortcodes::get_instance();
     if (is_admin()) {
         Stripe_Checkout_Admin::get_instance();
         Stripe_Checkout_Pro_Admin::get_instance();
         //Stripe_Checkout_Upgrade_Link::get_instance();
         Stripe_Checkout_Notices::get_instance();
         Stripe_Checkout_System_Status::get_instance();
     } else {
         Stripe_Checkout_Misc::get_instance();
     }
     // Need to leave outside of is_admin check or the AJAX will not work properly
     Stripe_Checkout_Pro_Functions::get_instance();
 }
 /**
  * Get the instance for all the included classes
  */
 public function init()
 {
     Stripe_Checkout_Scripts::get_instance();
     Stripe_Checkout_Shortcodes::get_instance();
     if (is_admin()) {
         Stripe_Checkout_Admin::get_instance();
         Stripe_Checkout_Upgrade_Link::get_instance();
         Stripe_Checkout_Notices::get_instance();
         Stripe_Checkout_System_Status::get_instance();
     } else {
         Stripe_Checkout_Misc::get_instance();
         Stripe_Checkout_Functions::get_instance();
     }
 }
 public function enqueue_admin_scripts()
 {
     global $base_class;
     if (Stripe_Checkout_Admin::get_instance()->viewing_this_plugin()) {
         wp_enqueue_script($base_class->plugin_slug . '-admin', SC_DIR_URL . 'assets/js/admin-main' . $this->min . '.js', array('jquery'), $base_class->version, true);
         wp_enqueue_script($base_class->plugin_slug . '-admin-pro', SC_DIR_URL . 'assets/js/admin-pro' . $this->min . '.js', array('jquery'), $base_class->version, true);
         wp_localize_script($base_class->plugin_slug . '-admin-pro', 'sc_strings', array('activate' => __('Activate', 'sc'), 'deactivate' => __('Deactivate', 'sc'), 'valid_msg' => __('License is valid and active.', 'sc'), 'inactive_msg' => __('License is inactive.', 'sc'), 'invalid_msg' => __('Sorry, but this license key is invalid.', 'sc'), 'notfound_msg' => __('License service could not be found. Please contact support for assistance.', 'sc'), 'error_msg' => __('An error has occurred, please try again.', 'sc')));
     }
 }
        /**
         * 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 
            }
        }