Automattic\WooCommerce\Admin\Features\MultichannelMarketing

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.

Usage

$result = Init::maybe_reload_page();

Init::maybe_reload_page() code WC 7.1.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();
}