Automattic\WooCommerce\Internal\Admin\Settings

Utils::wc_payments_settings_urlpublic staticWC 1.0

Retrieves a URL to relative path inside WooCommerce admin Payments settings with the provided query parameters.

Method of the class: Utils{}

No Hooks.

Returns

String. Fully qualified URL pointing to the desired path.

Usage

$result = Utils::wc_payments_settings_url( ?string $path, $query ): string;
?string $path
.
Default: null
$query(array)
Query parameters to append to the path.
Default: array()

Utils::wc_payments_settings_url() code WC 10.9.4

public static function wc_payments_settings_url( ?string $path = null, array $query = array() ): string {
	$path = $path ? '&path=' . $path : '';

	$query_string = '';
	if ( ! empty( $query ) ) {
		$query_string = '&' . http_build_query( $query );
	}

	return admin_url( 'admin.php?page=wc-settings&tab=checkout' . $path . $query_string );
}