Facing a weird issue. The filter isn't working at all. I want the user to redirect to the checkout page after registration. I tried putting the cart url instead of checkout and that too doesn't work. My other redirect with the woocommerce_add_to_cart_redirect
filter works fine.
function custom_registration_redirect() {
global $woocommerce;
$checkout_url = $woocommerce->cart->get_checkout_url();
return $checkout_url;
}
add_filter( 'woocommerce_registration_redirect', 'custom_registration_redirect' );
I tried searching for any plugin which would be overriding this but can't seem to find anything there.
After registration it's going to the My Account page with a _wc_user_reg
query string suffixed: /my-account/?_wc_user_reg=true
.
It's just not listening to this filter and always going here.
Any idea what is causing this problem?
Thanks.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire