woocommerce_account_content()WC 1.0

My Account content output.

Hooks from the function

Return

null. Nothing (null).

Usage

woocommerce_account_content();

woocommerce_account_content() code WC 8.6.1

function woocommerce_account_content() {
	global $wp;

	if ( ! empty( $wp->query_vars ) ) {
		foreach ( $wp->query_vars as $key => $value ) {
			// Ignore pagename param.
			if ( 'pagename' === $key ) {
				continue;
			}

			if ( has_action( 'woocommerce_account_' . $key . '_endpoint' ) ) {
				do_action( 'woocommerce_account_' . $key . '_endpoint', $value );
				return;
			}
		}
	}

	// No endpoint found? Default to dashboard.
	wc_get_template(
		'myaccount/dashboard.php',
		array(
			'current_user' => get_user_by( 'id', get_current_user_id() ),
		)
	);
}