WC_Admin_Notices::uploads_directory_is_unprotected_notice()public staticWC 4.2.0

Notice about uploads directory begin unprotected.

Method of the class: WC_Admin_Notices{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = WC_Admin_Notices::uploads_directory_is_unprotected_notice();

Changelog

Since 4.2.0 Introduced.

WC_Admin_Notices::uploads_directory_is_unprotected_notice() code WC 8.7.0

public static function uploads_directory_is_unprotected_notice() {
	if ( get_user_meta( get_current_user_id(), 'dismissed_uploads_directory_is_unprotected_notice', true ) || self::is_uploads_directory_protected() ) {
		self::remove_notice( 'uploads_directory_is_unprotected' );
		return;
	}

	include dirname( __FILE__ ) . '/views/html-notice-uploads-directory-is-unprotected.php';
}