Redirect filter Closes #2863.
This commit is contained in:
parent
ccf31dde34
commit
014e319528
|
@ -803,13 +803,13 @@ function woocommerce_process_registration() {
|
||||||
|
|
||||||
// Redirect
|
// Redirect
|
||||||
if ( wp_get_referer() ) {
|
if ( wp_get_referer() ) {
|
||||||
wp_safe_redirect( wp_get_referer() );
|
$redirect = esc_url( wp_get_referer() );
|
||||||
exit;
|
|
||||||
} else {
|
} else {
|
||||||
wp_redirect(get_permalink(woocommerce_get_page_id('myaccount')));
|
$redirect = esc_url( get_permalink( woocommerce_get_page_id( 'myaccount' ) ) );
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wp_redirect( apply_filters( 'woocommerce_registration_redirect', $redirect ) );
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1725,7 +1725,6 @@ add_action( 'template_redirect', 'woocommerce_save_address' );
|
||||||
* @param string $file_url
|
* @param string $file_url
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function woocommerce_get_filename_from_url( $file_url ) {
|
function woocommerce_get_filename_from_url( $file_url ) {
|
||||||
$parts = parse_url( $file_url );
|
$parts = parse_url( $file_url );
|
||||||
return basename( $parts['path'] );
|
return basename( $parts['path'] );
|
||||||
|
|
Loading…
Reference in New Issue