WC_Admin_Notices::add_redirect_download_method_notice()public staticWC 1.0

Add notice about Redirect-only download method, nudging user to switch to a different method instead.

Method of the class: WC_Admin_Notices{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = WC_Admin_Notices::add_redirect_download_method_notice();

WC_Admin_Notices::add_redirect_download_method_notice() code WC 8.6.1

public static function add_redirect_download_method_notice() {
	if ( 'redirect' === get_option( 'woocommerce_file_download_method' ) ) {
		self::add_notice( 'redirect_download_method' );
	} else {
		self::remove_notice( 'redirect_download_method' );
	}
}