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

Remove Sell Course with WooCommerce task and deprecate task class #7572

Merged
merged 6 commits into from Apr 3, 2024

Conversation

Imran92
Copy link
Contributor

@Imran92 Imran92 commented Apr 1, 2024

Resolves #7571

Proposed Changes

Removed usage of Sell your course with WooCommerce task's class and deprecated it.

Testing Instructions

  1. Create a new installation of Sensei.
  2. Install WooCommerce
  3. Go to Sensei LMS -> Home
  4. Make sure you see the task Sell your course with Sensei Pro instead of Sell your course with WooCommerce

Pre-Merge Checklist

  • PR title and description contain sufficient detail and accurately describe the changes
  • Acceptance criteria is met
  • Decisions are publicly documented
  • 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
  • New UIs match the designs
  • Different user privileges (admin, teacher, subscriber) are tested as appropriate
  • Legacy courses (course without blocks) are tested
  • Code is tested on the minimum supported PHP and WordPress versions
  • User interface changes have been tested on the latest versions of Chrome, Firefox and Safari
  • "Needs Documentation" label is added if this change requires updates to documentation
  • Known issues are created as new GitHub issues

@Imran92 Imran92 added this to the 4.23.0 milestone Apr 1, 2024
@Imran92 Imran92 requested a review from a team April 1, 2024 12:58
@Imran92 Imran92 self-assigned this Apr 1, 2024
Copy link

github-actions bot commented Apr 1, 2024

Test the previous changes of this PR with WordPress Playground.

Copy link

github-actions bot commented Apr 1, 2024

Test the previous changes of this PR with WordPress Playground.

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 51.78%. Comparing base (fc5fa71) to head (dc1a4ac).
Report is 1 commits behind head on trunk.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              trunk    #7572   +/-   ##
=========================================
  Coverage     51.78%   51.78%           
+ Complexity    11323    11321    -2     
=========================================
  Files           641      641           
  Lines         48164    48159    -5     
  Branches        468      468           
=========================================
- Hits          24941    24939    -2     
+ Misses        22844    22841    -3     
  Partials        379      379           
Files Coverage Δ
...in/home/tasks/class-sensei-home-tasks-provider.php 83.14% <ø> (+0.72%) ⬆️
includes/class-sensei-admin.php 12.10% <ø> (-0.02%) ⬇️
...-sensei-home-task-sell-course-with-woocommerce.php 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6a7655...dc1a4ac. Read the comment docs.

@@ -9,6 +9,8 @@
/**
* 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.
Copy link
Contributor

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.

Copy link
Contributor Author

@Imran92 Imran92 Apr 2, 2024

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

@Imran92 Imran92 requested a review from renatho April 2, 2024 08:56
Copy link

github-actions bot commented Apr 2, 2024

Test the previous changes of this PR with WordPress Playground.

Copy link

github-actions bot commented Apr 2, 2024

Test the previous changes of this PR with WordPress Playground.

* Class constructor.
*/
public function __construct() {
if ( is_wp_version_compatible( '6.4' ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL!

Copy link
Contributor

@renatho renatho left a 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!

@Imran92 Imran92 merged commit c77d5bc into trunk Apr 3, 2024
24 of 25 checks passed
@Imran92 Imran92 deleted the add/deprecate-sell-course-wth-woocommerce-task branch April 3, 2024 02:36
@donnapep donnapep added the Deprecation This change introduces a deprecation. label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecation This change introduces a deprecation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove upsell task Sell your course with WooCommerce task from Sensei core and deprecate class
3 participants