LLMS_DB_Upgrader::show_notice_complete()

Show a notice when the update is complete


Description Description

This will also delete the started notice. When short updates run quickly the started and completed notice may show up on the same page load which is confusing to look at it. If we just started and it’s already done when the next page loads we only need to see that update is complete.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class-llms-db-ugrader.php

	public function show_notice_complete() {

		// If the update started notice exists, delete it to avoid confusing UX when the update finishes before the page loads.
		if ( LLMS_Admin_Notices::has_notice( 'bg-db-update-started' ) ) {
			LLMS_Admin_Notices::delete_notice( 'bg-db-update-started' );
		}

		LLMS_Admin_Notices::add_notice(
			'bg-db-update-complete',
			__( 'The LifterLMS database update is complete.', 'lifterlms' ),
			array(
				'dismissible'      => true,
				'dismiss_for_days' => 0,
			)
		);

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.