Introduced filter to change default redirect url in wc_logout_url()

This commit is contained in:
Claudio Sanches 2019-07-31 20:35:10 -03:00
parent e9c6c06a81
commit 52ba85c977
1 changed files with 1 additions and 1 deletions

View File

@ -3480,7 +3480,7 @@ function wc_get_price_html_from_text() {
* @return string
*/
function wc_logout_url( $redirect = '' ) {
$redirect = $redirect ? $redirect : wc_get_page_permalink( 'myaccount' );
$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' );