wc_get_account_endpoint_url()WC 2.6.0

Get account endpoint URL.

Хуков нет.

Возвращает

Строку.

Использование

wc_get_account_endpoint_url( $endpoint );
$endpoint(строка) (обязательный)
Endpoint.

Список изменений

С версии 2.6.0 Введена.

Код wc_get_account_endpoint_url() WC 8.7.0

function wc_get_account_endpoint_url( $endpoint ) {
	if ( 'dashboard' === $endpoint ) {
		return wc_get_page_permalink( 'myaccount' );
	}

	if ( 'customer-logout' === $endpoint ) {
		return wc_logout_url();
	}

	return wc_get_endpoint_url( $endpoint, '', wc_get_page_permalink( 'myaccount' ) );
}