Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added redirect if offcanvas login failed #36

Merged
merged 3 commits into from Nov 14, 2021
Merged

Conversation

crftwrk
Copy link
Member

@crftwrk crftwrk commented Nov 13, 2021

Closes #35

This PR removes the hook for alerts in user offcanvas and redirects to my-account page if login failed.

Motivation

Before logged in via user offcanvas and entered a wrong password or username, offcanvas stayed open and alert was displayed inside offcanvas. This makes problems if a user edited data in dashboard. For example when changing the address, the alert for failed or success were shown in offcanvas too.

Now the hook for alerts is removed and user will be redirect to my-account page when login failed instead and alert is shown there.

  • Redirect to my-account page after login in offcanvas failed
  • Redirect to my-account page after login in checkout failed
  • Redirect to home page after logout
  • Alerts in dashboard are shown in the top of the page when changing data there

Test

Code is already live on bootscore.me.

  • Try to login with wrong user or/and password, you will be redirected to my-account page and get a feedback there what's wrong.
  • Login in user offcanvas with correct user and password.
  • Click in user offcanvas to Addresses and change something. Alert will be shown on top of the page if failed or success.
  • Click Logout in user offcanvas and you will be redirected to home page.

@crftwrk crftwrk added this to In progress in 5.1.3.1 via automation Nov 13, 2021
Copy link
Member

@justinkruit justinkruit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need some clarification, otherwise seems good to me.

woocommerce/woocommerce-functions.php Outdated Show resolved Hide resolved
@justinkruit justinkruit self-requested a review November 14, 2021 17:15
Copy link
Member

@justinkruit justinkruit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All seems fine 👍

@justinkruit justinkruit merged commit 76c709d into main Nov 14, 2021
5.1.3.1 automation moved this from In progress to Done Nov 14, 2021
@justinkruit justinkruit deleted the fix-offcanvas-alert branch November 14, 2021 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Alert notices are landing on offcanvas
2 participants