wc_get_account_endpoint_url

Get account endpoint URL.

Description

(string) wc_get_account_endpoint_url( (string) $endpoint ); 

Returns (string)

Parameters (1)

0. $endpoint (string)
The endpoint.

Usage

  1. if ( !function_exists( 'wc_get_account_endpoint_url' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-account-functions.php'; 
  3.  
  4. // The endpoint. 
  5. $endpoint = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wc_get_account_endpoint_url($endpoint); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-account-functions.php  
  1. function wc_get_account_endpoint_url( $endpoint ) { 
  2. if ( 'dashboard' === $endpoint ) { 
  3. return wc_get_page_permalink( 'myaccount' ); 
  4.  
  5. return wc_get_endpoint_url( $endpoint, '', wc_get_page_permalink( 'myaccount' ) );