Add support for notices
This commit is contained in:
parent
3acc03c804
commit
f5afddd4c9
|
@ -40,6 +40,7 @@ class WC_Admin_Notices {
|
|||
'maxmind_license_key' => 'maxmind_missing_license_key_notice',
|
||||
'redirect_download_method' => 'redirect_download_method_notice',
|
||||
'uploads_directory_is_unprotected' => 'uploads_directory_is_unprotected_notice',
|
||||
'base_tables_missing' => 'base_tables_missing_notice',
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -506,6 +507,21 @@ class WC_Admin_Notices {
|
|||
include dirname( __FILE__ ) . '/views/html-notice-uploads-directory-is-unprotected.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Notice about base tables missing.
|
||||
*/
|
||||
public static function base_tables_missing_notice() {
|
||||
$notice_dismissed = apply_filters(
|
||||
'woocommerce_hide_base_tables_missing_nag',
|
||||
get_user_meta( get_current_user_id(), 'dismissed_base_tables_missing_notice', true )
|
||||
);
|
||||
if ( $notice_dismissed ) {
|
||||
self::remove_notice( 'base_tables_missing' );
|
||||
}
|
||||
|
||||
include dirname( __FILE__ ) . '/views/html-notice-base-table-missing.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the store is running SSL.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue