wc_logout_url( string $redirect = '' )
Get logout endpoint.
Description Description
Parameters Parameters
- $redirect
-
(Optional) Redirect URL.
Default value: ''
Return Return
(string)
Source Source
File: includes/wc-template-functions.php
function wc_logout_url( $redirect = '' ) { $redirect = $redirect ? $redirect : apply_filters( 'woocommerce_logout_default_redirect_url', wc_get_page_permalink( 'myaccount' ) ); if ( get_option( 'woocommerce_logout_endpoint' ) ) { return wp_nonce_url( wc_get_endpoint_url( 'customer-logout', '', $redirect ), 'customer-logout' ); } return wp_logout_url( $redirect ); }
Changelog Changelog
Version | Description |
---|---|
2.6.9 | Introduced. |