wc_get_page_permalink

Retrieve page permalink.

Description

(string) wc_get_page_permalink( (string) $page ); 

Returns (string)

Parameters (1)

0. $page (string)
The page.

Usage

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

Defined (1)

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

/includes/wc-page-functions.php  
  1. function wc_get_page_permalink( $page ) { 
  2. $page_id = wc_get_page_id( $page ); 
  3. $permalink = 0 < $page_id ? get_permalink( $page_id ) : get_home_url(); 
  4. return apply_filters( 'woocommerce_get_' . $page . '_page_permalink', $permalink );