/** * Checks if required PHP extensions are loaded and SSL is enabled. Adds an * admin notice if either check fails. Also plugin settings can be checked * as well. * * @since 1.0 * @see SV_WC_Plugin::render_admin_notices() */ public function render_admin_notices() { // any plugin notices parent::render_admin_notices(); // notices for ssl requirement $this->render_ssl_admin_notices(); // notices for currency issues $this->render_currency_admin_notices(); }
/** * Render a notice for the user to select their desired export format * * @since 2.1 * @see SV_WC_Plugin::render_admin_notices() */ public function render_admin_notices() { // show any dependency notices parent::render_admin_notices(); $settings = get_option('woocommerce_braintree_settings'); // install notice if (empty($settings) && !$this->is_message_dismissed('install-notice')) { $this->add_dismissible_notice(sprintf(__('Thanks for installing the WooCommerce Braintree plugin! To start accepting payments, %sset your Braintree API credentials%s. Need help? See the %sdocumentation%s. ', self::TEXT_DOMAIN), '<a href="' . $this->get_settings_url() . '">', '</a>', '<a target="_blank" href="' . $this->get_documentation_url() . '">', '</a>'), 'install-notice'); } // SSL check (only when enabled in production mode) if (isset($settings['enabled']) && 'yes' == $settings['enabled']) { if (isset($settings['environment']) && 'production' == $settings['environment']) { if ('no' === get_option('woocommerce_force_ssl_checkout') && !$this->is_message_dismissed('ssl-recommended-notice')) { $this->add_dismissible_notice(__('WooCommerce is not being forced over SSL -- Braintree recommends forcing the checkout over SSL for maximum security. ', self::TEXT_DOMAIN), 'ssl-recommended-notice'); } } } }