Automattic\WooCommerce\Admin\Features\Navigation

Init::maybe_reload_page()public staticWC 1.0

Reload the page if the setting has been updated.

Method of the class: Init{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = Init::maybe_reload_page();

Init::maybe_reload_page() code WC 8.7.0

public static function maybe_reload_page() {
	if ( ! isset( $_SERVER['REQUEST_URI'] ) || ! self::$is_updated ) {
		return;
	}

	wp_safe_redirect( wp_unslash( $_SERVER['REQUEST_URI'] ) );
	exit();
}