Skip to content

Update priority of login redirect and limit to My Courses page #7821

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

Merged
merged 6 commits into from
May 12, 2025

Conversation

donnapep
Copy link
Collaborator

@donnapep donnapep commented May 4, 2025

Resolves #7747 and #2823.

Proposed Changes

Testing Instructions

  1. Log in as a teacher on the My Courses pages.
  2. Ensure you're redirected to the dashboard.
  3. Login in as an admin on the My Courses pages.
  4. Ensure you're redirected to the dashboard.
  5. Activate WooCommerce.
  6. Go to the My Account page.
  7. Log in as an admin.
  8. Ensure you stay on the My Account page.

Pre-Merge Checklist

  • PR title and description contain sufficient detail and accurately describe the changes
  • Adheres to coding standards (PHP, JavaScript, CSS, HTML)
  • All strings are translatable (without concatenation, handles plurals)
  • Follows our naming conventions (P6rkRX-4oA-p2)
  • Hooks (p6rkRX-1uS-p2) and functions are documented
  • New UIs are responsive and use a mobile-first approach
  • Code is tested on the minimum supported PHP and WordPress versions

@donnapep donnapep added this to the 4.25.1 milestone May 4, 2025
@donnapep donnapep self-assigned this May 4, 2025
@donnapep donnapep added the Deprecation This change introduces a deprecation. label May 4, 2025
@donnapep
Copy link
Collaborator Author

donnapep commented May 4, 2025

@m1r0 Tagging you for a quickie review in case I may be missing something. When I removed the filter, the student was still redirected to the admin. But they weren't being redirected back in 2015. So I suppose something changed between now and then in WordPress Core?

UPDATE: Ah, I see it's when they log in via the My Courses page. Need to rework.

@donnapep donnapep requested a review from m1r0 May 4, 2025 14:16
@donnapep donnapep removed the request for review from m1r0 May 4, 2025 16:50
@donnapep donnapep marked this pull request as draft May 4, 2025 16:51
@donnapep donnapep marked this pull request as ready for review May 11, 2025 14:32
@donnapep donnapep changed the title Remove teacher redirect on login Update priority of login redirect and limit to My Courses page May 11, 2025
@donnapep
Copy link
Collaborator Author

@m1r0 Updated the code to resolve two issues. 🙏🏻

@donnapep donnapep requested a review from m1r0 May 11, 2025 14:42
@donnapep donnapep removed the Deprecation This change introduces a deprecation. label May 11, 2025
Copy link
Member

@m1r0 m1r0 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks, Donna!

@m1r0 m1r0 merged commit d159660 into trunk May 12, 2025
22 checks passed
@m1r0 m1r0 deleted the remove/teacher-redirect branch May 12, 2025 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sensei's redirect after login breaks other functionality Admin users are redirected to wp-admin when logging in via My Account page.
2 participants