-
Notifications
You must be signed in to change notification settings - Fork 209
Fix early translation in the tracking class #7780
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. |
2652426 to
132ee10
Compare
|
Test the previous changes of this PR with WordPress Playground. |
132ee10 to
3b84567
Compare
|
Test the previous changes of this PR with WordPress Playground. |
|
Test the previous changes of this PR with WordPress Playground. |
| * @access private | ||
| */ | ||
| public function register_course_list_block_patterns() { | ||
| require __DIR__ . '/course-list/class-sensei-course-list-block-patterns.php'; |
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.
This file is already loaded by the composer autoloader, so there's no need to require it again. It was causing a Fatal error: Cannot declare class Sensei_Course_List_Block_Patterns, because the name is already in use when testing using multiple do_action( 'init' ) calls (check the tests code).
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.
Looks good and works well!
Also confirmed that the data is sent correctly when running the event.
Related to #7701 and #7770
Proposed Changes
sensei_usage_tracking_send_usage_datacron schedule is added. The error is also visible when activating Sensei Pro for the first time. The issue is solved by moving the cron schedule initialization to theinithook, which is a somewhat standard practice. As a side effect, this approach also forces thewp_schedule_eventto be called oninitas well.Testing Instructions
On WordPress 6.8 the deprecation notice can be seen even when the language is English. For ease of testing, the testing instructions target this version.
sensei_usage_tracking_send_usage_datacron and delete it.PHP Notice: Function _load_textdomain_just_in_time was called incorrectly.sensei_usage_tracking_send_usage_datajob is re-created.Pre-Merge Checklist