Filter
rpress_account_page_url
On this page
Filters the URL returned for the customer account page.
Applied by rpress_account_page_url() to the permalink of the account page, or to an empty string when no page is found. It affects only callers of that function: rpress_account_url() builds section links from the page permalink directly and has its own filter.
Available since RestroPress 3.5.1.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$url | string | Account page permalink, or ''. |
$page_id | int | Account page ID, 0 when there is none. |
Return value#
string. Account page URL, or ''.
Example#
add_filter( 'rpress_account_page_url', 'my_account_page_url', 10, 2 );
function my_account_page_url( $url, $page_id ) {
return '' === $url ? home_url( '/my-account/' ) : $url;
}
Source#
Applied in:
includes/features/account/loader.php(line 205), inrpress_account_page_url()
See also#
Was this page helpful?
