When Customer Login the website redirect to the home page

Is it possible when customer login to the website through email instead of account page the website redirect to the home page?

Hello @Abdussamad ,

Using Shopify’s Liquid code: If you want to add this behavior globally, you can use a small piece of code in your theme. You would need to insert a redirect within the customer.login or customer object. Here’s an example that forces a redirect to the homepage:

Add this to your theme’s theme.liquid or customers/account.liquid:

{% if customer %} {% endif %}

This script will automatically redirect any logged-in customer to the homepage.

There is native solution.

Go edit code, navigate to main-activate-account.liquid, find the form and add return_to

{%- form ‘activate_customer_password’, return_to: ‘/’-%}