-
Notifications
You must be signed in to change notification settings - Fork 209
Sensei Upsell: Update upgrade URL based on hosting provider #7790
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
Conversation
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
WordPress Dependencies ReportThe No changes detected in the current commit. But the comment was left so it is possible to check for the edit history. This comment was automatically generated by the |
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
fb363a2 to
469d046
Compare
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
|
Hey @renatho, I've updated my approach and created a 'single source of truth' related to the upsell URL generation. It is consumed on both the FE and BE sides. When you find some time, please take a look. Thanks! |
renatho
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this, @bogiii!
The solution looks great! I just realized a few things and added in comments in the code.
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
- Move upsell URL to global admin data via window.sensei_admin - Create reusable getSenseiProUpsellUrl helper function - Update course upgrade step to use global helper
Replace hardcoded URLs with calls to Sensei_Pro_Upsell::get_base_url() and get_default_utm_params() across the codebase for better maintainability and consistency. Updated files: - class-sensei-home-task-pro-upsell.php - class-sensei-course.php - class-sensei-groups-landing-page.php - class-sensei-lesson.php - class-sensei-settings-api.php - class-sensei-course-theme-template-selection.php - class-email-list-table.php Also added proper use statements for Sensei_Pro_Upsell and add_query_arg functions where needed.
91f1031 to
02ac51a
Compare
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
|
LTMG! Thanks for the updates, Bogi! I'm merging it to start testing on WP 6.8. |
Resolves #7784
Proposed Changes
Testing Instructions
npm run buildcommandsensei-lms.zipfile generated by the first step on Dotcomhttps://wordpress.com/plugins/sensei-pro/{SITE_SLUG}Some of the affected CTAs:



Pre-Merge Checklist