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
Remove Sell Course with WooCommerce task and deprecate task class #7572
Changes from all commits
d080f6d
af71e71
b26fe07
f158431
9ac6dca
dc1a4ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: deprecated | ||
|
||
Remove Sell your course with WooCommerce task from core |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,24 @@ | |
/** | ||
* Sensei_Home_Task_Sell_Course_With_WooCommerce class. | ||
* | ||
* @deprecated $$next-version$$ We're now showing the "Sell your course with Sensei Pro" (Sensei_Home_Task_Pro_Upsell) task instead of this task. | ||
* | ||
* @since 4.8.0 | ||
*/ | ||
class Sensei_Home_Task_Sell_Course_With_WooCommerce implements Sensei_Home_Task { | ||
const VISITED_WOOCOMMERCE_ADMIN_OPTION_KEY = 'sensei_home_task_visited_woocommerce'; | ||
|
||
/** | ||
* Class constructor. | ||
*/ | ||
public function __construct() { | ||
if ( is_wp_version_compatible( '6.4' ) ) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL! |
||
_deprecated_class( __CLASS__, '$$next-version$$', 'Sensei_Home_Task_Pro_Upsell' ); | ||
Check warning on line 24 in includes/admin/home/tasks/task/class-sensei-home-task-sell-course-with-woocommerce.php Codecov / codecov/patchincludes/admin/home/tasks/task/class-sensei-home-task-sell-course-with-woocommerce.php#L22-L24
|
||
} else { | ||
_deprecated_function( __METHOD__, '$$next-version$$', 'Sensei_Home_Task_Pro_Upsell::__construct' ); | ||
Check warning on line 26 in includes/admin/home/tasks/task/class-sensei-home-task-sell-course-with-woocommerce.php Codecov / codecov/patchincludes/admin/home/tasks/task/class-sensei-home-task-sell-course-with-woocommerce.php#L26
|
||
} | ||
} | ||
|
||
/** | ||
* The ID for the task. | ||
* | ||
|
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.
WDYT of adding a constructor here calling the
_deprecated_function
. So if something is still using it will add the warning to the logs.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.
Good suggestion, updated here 9ac6dca