Dev Resources

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

wc_get_account_endpoint_url( string $endpoint )

Get account endpoint URL.

Contents

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

Description #Description


Parameters #Parameters

$endpoint

(Required) Endpoint.


Top ↑

Return #Return

(string)


Top ↑

Source #Source

File: includes/wc-account-functions.php

function wc_get_account_endpoint_url( $endpoint ) {
	if ( 'dashboard' === $endpoint ) {
		return wc_get_page_permalink( 'myaccount' );
	}

	if ( 'customer-logout' === $endpoint ) {
		return wc_logout_url();
	}

	return wc_get_endpoint_url( $endpoint, '', wc_get_page_permalink( 'myaccount' ) );
}

Expand full source code Collapse full source code


Top ↑

Changelog #Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

Related #Related

Top ↑

Uses #Uses

Uses
Uses Description
includes/wc-template-functions.php: wc_logout_url()

Get logout endpoint.

includes/wc-page-functions.php: wc_get_page_permalink()

Retrieve page permalink.

includes/wc-page-functions.php: wc_get_endpoint_url()

Get endpoint URL.

Top ↑

Used By #Used By

Used By
Used By Description
packages/woocommerce-blocks/src/Domain/Services/Email/CustomerNewAccount.php: CustomerNewAccount::trigger()

Trigger.

includes/admin/class-wc-admin-customize.php: WC_Admin_Customize::register_customize_nav_menu_items()

Register account endpoints to customize nav menu items.

includes/admin/class-wc-admin-menus.php: WC_Admin_Menus::nav_menu_links()

Output menu links.

includes/wc-template-functions.php: wc_template_redirect()

Handle redirects before content is output – hooked into template_redirect so is_page works.

includes/class-wc-form-handler.php: WC_Form_Handler::process_lost_password()

Handle lost password form.

includes/class-wc-form-handler.php: WC_Form_Handler::delete_payment_method_action()

Process the delete payment method form.

includes/class-wc-form-handler.php: WC_Form_Handler::set_default_payment_method_action()

Process the delete payment method form.

Show 2 more used by Hide more used by

Top ↑

User Contributed Notes #User Contributed Notes

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

Proudly powered by WordPress