Dev Resources

  • Home
  • Reference
  • BuddyX Theme
  • Functions
  • Hooks
  • Classes
Filter by type:
Search
Browse: Home / Reference / Classes / WC_Shortcode_My_Account / WC_Shortcode_My_Account::my_account()

Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

WC_Shortcode_My_Account::my_account( array $atts )

My account page.

Contents

  • Description
    • Parameters
    • Source
  • Related
    • Uses
    • Used By
  • User Contributed Notes

Description #Description


Parameters #Parameters

$atts

(Required) Shortcode attributes.


Top ↑

Source #Source

File: includes/shortcodes/class-wc-shortcode-my-account.php

	private static function my_account( $atts ) {
		$args = shortcode_atts(
			array(
				'order_count' => 15, // @deprecated 2.6.0. Keep for backward compatibility.
			),
			$atts,
			'woocommerce_my_account'
		);

		wc_get_template(
			'myaccount/my-account.php',
			array(
				'current_user' => get_user_by( 'id', get_current_user_id() ),
				'order_count'  => 'all' === $args['order_count'] ? -1 : $args['order_count'],
			)
		);
	}

Expand full source code Collapse full source code


Top ↑

Related #Related

Top ↑

Uses #Uses

Uses
Uses Description
includes/wc-core-functions.php: wc_get_template()

Get other templates (e.g. product attributes) passing attributes and including the file.

Top ↑

Used By #Used By

Used By
Used By Description
includes/shortcodes/class-wc-shortcode-my-account.php: WC_Shortcode_My_Account::output()

Output the shortcode.


Top ↑

User Contributed Notes #User Contributed Notes

You must log in before being able to contribute a note or feedback.

Proudly powered by WordPress