woocommerce_account_content

My Account content output.

Description

woocommerce_account_content(); 

Usage

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

Defined (1)

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

/includes/wc-template-functions.php  
  1. function woocommerce_account_content() { 
  2. global $wp; 
  3.  
  4. foreach ( $wp->query_vars as $key => $value ) { 
  5. // Ignore pagename param. 
  6. if ( 'pagename' === $key ) { 
  7. continue; 
  8.  
  9. if ( has_action( 'woocommerce_account_' . $key . '_endpoint' ) ) { 
  10. return; 
  11.  
  12. // No endpoint found? Default to dashboard. 
  13. wc_get_template( 'myaccount/dashboard.php', array( 
  14. 'current_user' => get_user_by( 'id', get_current_user_id() ),  
  15. ) );