WC_Helper::get_source_page()private staticWC 1.0

Get the source page for the connect URL (wc-admin or wc-addons/extensions)

Method of the class: WC_Helper{}

No Hooks.

Returns

String.

Usage

$result = WC_Helper::get_source_page();

WC_Helper::get_source_page() code WC 9.8.5

private static function get_source_page() {
	$page = wc_clean( wp_unslash( $_GET['page'] ?? 'wc-admin' ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
	return in_array( $page, array( 'wc-admin', 'wc-addons' ), true ) ? $page : 'wc-admin';
}