WC_Regenerate_Images::dismiss_regenerating_notice()public staticWC 1.0

Dismiss notice and cancel jobs.

Метод класса: WC_Regenerate_Images{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$result = WC_Regenerate_Images::dismiss_regenerating_notice();

Код WC_Regenerate_Images::dismiss_regenerating_notice() WC 7.1.0

public static function dismiss_regenerating_notice() {
	if ( self::$background_process ) {
		self::$background_process->kill_process();

		$log = wc_get_logger();
		$log->info(
			__( 'Cancelled product image regeneration job.', 'woocommerce' ),
			array(
				'source' => 'wc-image-regeneration',
			)
		);
	}
	WC_Admin_Notices::remove_notice( 'regenerating_thumbnails' );
}