Introduced filter to change default redirect url in wc_logout_url()
This commit is contained in:
parent
e9c6c06a81
commit
52ba85c977
|
@ -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' );
|
||||
|
|
Loading…
Reference in New Issue