Introduced message about secure connection

This commit is contained in:
Claudio Sanches 2018-04-17 17:39:18 -03:00
parent 718c91f920
commit 8350f88f57
2 changed files with 30 additions and 0 deletions

View File

@ -37,6 +37,7 @@ class WC_Admin_Notices {
'no_shipping_methods' => 'no_shipping_methods_notice',
'simplify_commerce' => 'simplify_commerce_notice',
'regenerating_thumbnails' => 'regenerating_thumbnails_notice',
'no_secure_connection' => 'secure_connection_notice',
);
/**
@ -330,6 +331,13 @@ class WC_Admin_Notices {
public static function regenerating_thumbnails_notice() {
include 'views/html-notice-regenerating-thumbnails.php';
}
/**
* Notice about secure connection.
*/
public static function secure_connection_notice() {
include dirname( __FILE__ ) . '/views/html-notice-secure-connection.php';
}
}
WC_Admin_Notices::init();

View File

@ -0,0 +1,22 @@
<?php
/**
* Admin View: Notice - Secure connection.
*
* @package WooCommerce\Admin\Notices
*/
defined( 'ABSPATH' ) || exit;
?>
<div id="message" class="updated woocommerce-message">
<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'no_secure_connection' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>
<p>
<?php
echo sprintf(
/* translators: %s: documentation URL */
esc_html__( 'Your store is not using HTTPS, this is requeried to sell in some countries and to protect your customer data. <a href="%s">Learn more about HTTPS and SSL Certificates.</a>', 'woocommerce' )
);
?>
</p>
</div>