Posted on Leave a comment

Creating Products from the Course Editor

In WooCommerce Paid Courses 2.5.0, we’ve added the ability to create a WooCommerce product from within the course editor. 😍 Now, there’s really no reason to ever leave the editor while building your course!

And, after creating your product, it’s automatically linked to the course for you. Easy peasy!

To add a product, just look for the Pricing section in the Course sidebar:

“Create a new product” link in the Course sidebar
Creating a new product from the Course sidebar

Or, if you’re using the Course Signup block (formerly known as the Take Course block), you can create a product from the pricing modal:

“Create a new product” link in the Course Signup block
Creating a new product from the Course Signup block

Also, if you prefer to work inside WooCommerce, you can associate one or more courses with a product right in the product page.

To update, please head on over to Dashboard → Updates in the WordPress admin.

Please note: While we have thoroughly tested this release, it’s always possible that we’ve missed something. We recommend that you test the update on a staging site before updating your live site.

For Developers

New Filters

  • sensei_learner_courses_page_template –  Filter the My Courses page template when created through the setup wizard.
  • sensei_course_completed_page_template – Filter the Course Completed page template when created through the setup wizard.

Template File Changes

  • templates/content-course.php – Don’t add HTML for the course excerpt if it’s empty.

Deprecated Code

  • Courses::add_product_catalog_data – No replacement.
Posted on Leave a comment

Celebrate Wins with the Course Completed Page

Everyone deserves to be recognized for a job well done! ⭐

That’s why, in Sensei LMS 3.13, we’ve added a Course Completed page that is displayed immediately after the learner finishes the last lesson. This page congratulates them on completing the course, provides some next steps, and displays their results:

Screenshot of the Course Completed page

And the best part is that you can customize this page however you like! You could:

  • Cross-promote or cross-sell other courses
  • Ask for feedback via a course evaluation form
  • Request a review of the course

The simplest way to create this page and start using it right away is to re-run the setup wizard from the Help tab on the Courses page:

Screenshot showing how to access the setup wizard from the Courses help tab.
Launching the Setup Wizard

See what else is in this release.

What’s New in WooCommerce Paid Courses?

We’ve streamlined the way products are assigned to courses in the course editor AND added the ability to link courses and products right from the product page!

If your workflow involves creating courses first and then products, you can now link them together without ever leaving the WooCommerce product page:

Screenshot showing how to associate courses with a product.
Linking courses to a product on the product page

Or, if you prefer to create products first and then courses, you can link them on the course page from either the Pricing section of the sidebar or the Take Course block:

Screenshot showing the Pricing section in the Course sidebar.
Pricing section in the Course sidebar
Screenshot showing the modal to link a course to products from the Take Course block.
Linking products to a course from the Take Course block

For Developers

New Filters

  • sensei-lms.Course.completedActions – Customize the Course Completed Actions block buttons (JS).
  • Sensei_Course::sensei_course_completed_page_url – Filter the course completed page URL.

Deprecated Code

  • getProducts selector and its related functions in the Products store (JS).
  • Sensei_WC_Paid_Courses\Courses::store_user_confirmation – No replacement.
  • Sensei_WC_Paid_Courses\Courses::update_modal_confirmation_date – No replacement.
  • Sensei_WC_Paid_Courses\Courses::has_user_confirmed_modal – No replacement.

To update, please head on over to Dashboard → Updates in the WordPress admin.

Please note: While we have thoroughly tested this release, it’s always possible that we’ve missed something. We recommend that you test the update on a staging site before updating your live site.

Posted on Leave a comment

Sensei LMS 3.8 & WC Paid Courses 2.3.1 Betas – New Course & Lesson Blocks

Sensei LMS 3.8

Sensei LMS 3.8 is ready for testing, and contains two brand new blocks!

Conditional Content Block

The Conditional Content block can be used to conditionally display content on the course page depending on whether the visitor is enrolled or not enrolled in the course, or has already completed it:

Lesson Actions Block

The Lesson Actions block is a grouping of buttons that enables a learner to perform specific actions for a lesson. The style of these buttons are inherited from the theme, but can be customized independently:

See what else is in this release.

Testing Sensei LMS

*Please note that the test site integrates with Smartlook to record your visit. Smartlook is GDPR compliant out of the box, and any recordings will be deleted automatically after 1 month.

If you find a bug, please submit an issue on Github or leave a comment on this post. Our tentative release date is February 9th.

WooCommerce Paid Courses 2.3.1

WooCommerce Paid Courses 2.3.1 fixes an issue where some text was not being translated.

Testing WooCommerce Paid Courses

Beta testers will receive the WooCommerce Paid Courses beta directly to their inbox. If you would like to sign up to be a beta tester and have a valid license, please fill out the beta tester signup form using the same email address you used to purchase your license.

If you find a bug, please leave a comment on this post. Our tentative release date is February 9th.

As these are beta releases, please test them on a staging site and not your live site. If you don’t have a staging site, you can use the WP Staging plugin to create one.

For Developers

If you’re a developer, there’s a single deprecation in Sensei LMS that you need to be aware of:

  • Sensei_Block_Take_Course::get_course_prerequisite_message – Replaced by Sensei_Course::get_course_prerequisite_message
  • Sensei_Setup_Wizard::setup_wizard_set_script_translations (Added on February 9)

Thank you to all our testers and contributors!

Posted on 3 Comments

Sensei LMS 3.7 & WooCommerce Paid Courses 2.3

What’s New in Sensei LMS 3.7?

Sensei LMS 3.7 contains some important bug fixes and performance improvements, and adds an integration with the Site Health tool.

One especially important bug fix involves a pesky issue where some learners were being added to a course or lesson multiple times. This was preventing those learners from making progress in the course. As part of that fix, we’ve also brought back the ability to remove a learner’s progress at the lesson level.

Upon upgrading to 3.7, indexes are automatically added to the comments table if they don’t already exist. As Sensei LMS stores a lot of data in this table, this should noticeably improve the performance of large sites.

We’ve also added an integration with the Site Health tool. The integration does some checks on the status of the learner enrolment job and migration, and will also let you know if your theme is using outdated Sensei template files:

See the full list of changes.

What’s New in WooCommerce Paid Courses 2.3?

When a learner purchases one or more courses, those courses are now listed on the Order Details page. Clicking on any of the courses takes the learner right to that course:

We’ve also added a Courses section to the sidebar of the My Account page, which navigates to the learner’s My Courses page:

Developers: For new hooks, deprecations and template file changes, please see the beta release post.

To update, please head on over to DashboardUpdates in the WordPress admin.

Please note: While we have thoroughly tested this release, it’s always possible that we’ve missed something. We recommend that you test the update on a staging site before updating your live site.

Thank you to all our testers and contributors!

Posted on Leave a comment

Sensei LMS 3.7 & WooCommerce Paid Courses 2.3 Beta Releases

Sensei LMS 3.7

Sensei LMS 3.7 is now available for testing. This release includes some performance improvements, small enhancements, and important bug fixes:

See what else is in this release.

New Filters

  • sensei_add_comment_indexes – Whether to add indexes to the comments table. Default true.
  • sensei_duplicate_post_ignore_meta – Meta keys to ignore when duplicating content.
  • sensei_quiz_answer_file_upload_types – Allowed mime types for file upload questions.
  • sensei_show_enrolment_debug_button – Whether to show the enrolment debug button in Learner Management.
  • sensei_tools – Functionality available from the Tools menu.

New Action

  • sensei_tools_listing_after_{$tool_id} – Display additional information for a specific tool, such as status.

Deprecations

  • Sensei_Admin_Rest_Api_Testharness – Deprecated the entire class.
  • Sensei_Setup_Wizard::get_woocommerce_connect_data – Use Sensei_Utils::get_woocommerce_connect_data.
  • Sensei_Updates::assign_role_caps – Use Sensei_Main::assign_role_caps.
  • Sensei_Updates::add_sensei_caps – Use Sensei_Main::add_sensei_admin_caps.
  • Sensei_Updates::add_editor_caps – Use Sensei_Main::add_editor_caps.
  • Sensei_Updates::sensei_updates_page
  • Sensei_Updates::function_in_whitelist
  • Sensei_Updates::update
  • Sensei_Updates::set_default_quiz_grade_type
  • Sensei_Updates::set_default_question_type
  • Sensei_Updates::update_question_answer_data
  • Sensei_Updates::update_question_grade_points
  • Sensei_Updates::convert_essay_paste_questions
  • Sensei_Updates::set_random_question_order
  • Sensei_Updates::set_default_show_question_count
  • Sensei_Updates::remove_deleted_user_activity
  • Sensei_Updates::add_teacher_role
  • Sensei_Updates::restructure_question_meta
  • Sensei_Updates::update_quiz_settings
  • Sensei_Updates::reset_lesson_order_meta
  • Sensei_Updates::update_question_gap_fill_separators
  • Sensei_Updates::update_quiz_lesson_relationship
  • Sensei_Updates::status_changes_fix_lessons
  • Sensei_Updates::status_changes_convert_lessons
  • Sensei_Updates::status_changes_convert_courses
  • Sensei_Updates::status_changes_repair_course_statuses
  • Sensei_Updates::status_changes_convert_questions
  • Sensei_Updates::update_legacy_sensei_comments_status
  • Sensei_Updates::update_comment_course_lesson_comment_counts
  • Sensei_Updates::remove_legacy_comments
  • Sensei_Updates::index_comment_status_field
  • Sensei_Updates::enhance_teacher_role
  • Sensei_Updates::recalculate_enrolment

Testing Sensei LMS

You can download the Sensei LMS 3.7 beta here. Alternatively, if you don’t have a staging site, you can use our Sensei LMS Test Site. You will be given the same level of access as a teacher, so some functionality may not be available. Please note that the test site integrates with Smartlook to record your visit. Smartlook is GDPR compliant out of the box, and any recordings will be automatically deleted after 1 month.

If you find a bug, please submit an issue on Github or leave a comment on this post. Our tentative release date is January 21st.

WooCommerce Paid Courses 2.3

WooCommerce Paid Courses 2.3 contains a couple of small improvements that we think will make a big difference in helping your learners get started after purchasing a course:

  • Added a link to the My Courses page on the My Account page.
  • Added a Courses section to the order details page so that learners can see which courses they’ve purchased.
  • When a product is sent to the trash, remove that product from all applicable courses.
  • Don’t copy the product over when duplicating a course. This ensures that any learners who purchased the original course don’t gain access to the duplicated course.

New Filter

  • sensei_wc_paid_courses_my_account_menu_courses_position – Change the position of the Courses item in the My Account menu.

Deprecations

  • Sensei_WC::course_link_from_order
  • Sensei_WC::generate_order_notice

Testing WooCommerce Paid Courses

Beta testers will receive the WooCommerce Paid Courses beta directly to their inbox. If you would like to sign up to be a beta tester and have a valid license, please fill out the beta tester signup form using the same email address you used to purchase your license.

If you find a bug, please leave a comment on this post. Our tentative release date is January 21st.

As these are beta releases, please test them on a staging site and not your live site. If you don’t have a staging site, you can use the WP Staging plugin to create one.

Thank you to all our testers and contributors!

Posted on 8 Comments

All-New Course Blocks in Sensei LMS 3.6 and WC Paid Courses 2.2

We are very pleased to announce that Sensei LMS 3.6 is now publicly available. Although technically a minor release, 3.6 packs a major punch!

What’s New in Sensei LMS 3.6?

Sensei LMS 3.6 introduces several new blocks to the course page:

When creating a new course, these blocks are automatically added to the page for you. They are equivalent to the elements that already appear on the course page, but because they have been rewritten as blocks, it’s now possible to change how they look, adjust their order, or remove them altogether:

Take Course

The Take Course block is a button that enables a registered user to enrol in the course. Once enrolled, the Take Course button is no longer displayed for that user. The block can be customized by changing its style, colors or border.

Contact Teacher

The Contact Teacher block enables registered users to contact the teacher. The user is not required to be enrolled in the course in order to send a message to the teacher. Similar to Take Course, the Contact Teacher block can have its style, colors and border customized.

Course Progress

Course Progress displays the user’s progress in the course. This block is only visible to users who are already enrolled. The course progress block enables you to customize the border radius, progress bar height, and colors.

Course Outline

In addition to displaying the modules and lessons that make up a course, the course outline block enables you to build your course structure right inside the editor! Any modules or lessons you add to the block will be created automatically once the course is saved:

Please note that it’s not currently possible to add existing modules or lessons to the course outline block. Given this, the recommended flow for creating a new course is to start with the course outline block, and then add content to the individual modules and lessons once they’ve been created.

You can learn more about how to use these blocks in our documentation. A future release will add more blocks for both lessons and quizzes.

What If I Don’t Want to Use Blocks?

If you’d rather not use blocks for new courses, you can remove them in the editor and the PHP template will be used to render the course as before. This will create a consistent experience for learners until you’re able to update existing courses to also use blocks.

What Else is in This Release?

Here are some other enhancements and fixes you’ll find in 3.6:

  • Ensure analysis export works with RTL languages.
  • Fix incorrect rounding of maximum file size for file upload questions.
  • Ensure learners who have already viewed a quiz see the latest updates the next time they view it.
  • Remove wrapper elements from templates. This should improve the look of Sensei pages on some themes.
  • Enforce minimum PHP version of 7.0.

See the full list of changes.

What’s New in WooCommerce Paid Courses 2.2?

WooCommerce Paid Courses 2.2 extends the Take Course block, and changes it to a Purchase Course button if there is a single product attached to the course, or pricing cards if there are multiple products attached to the course:

Developers: For new hooks, deprecations and template file changes, please see the beta release post.

To update, please head on over to DashboardUpdates in the WordPress admin.

Please note: While we have thoroughly tested this release, it’s always possible that we’ve missed something. We recommend that you test the update on a staging site before updating your live site.

Thank you to all our testers and contributors!

Posted on Leave a comment

Sensei LMS 3.6 & WooCommerce Paid Courses 2.2 Beta 2

Today we’re releasing Sensei LMS 3.6 Beta 2 and WooCommerce Paid Courses 2.2 Beta 2. We are on track to release on December 10th, 2020.

Sensei LMS

Here’s what’s changed in Beta 2:

Course Outline Block

  • Add support for default theme colors to Course Outline block
  • Add support for default theme colors to the module border color setting
  • Make border rules for “Minimal” module style less specific to allow overrides
  • Fix race condition when saving
  • Fix how “Edit Lesson” link displays in WordPress 5.4

Contact Teacher Block

  • Change Contact Teacher button default style

Other

  • Don’t show “Course Video” metabox when any Sensei block is added to the course page
  • Use Sensei logo in block inserter

*Please note that the test site integrates with Smartlook to record your visit. Smartlook is GDPR compliant out of the box, and any recordings will be deleted automatically after 1 month.

WooCommerce Paid Courses

Here’s what’s changed in Beta 2:

Purchase Course Block

  • Warn learner when buying a product containing a course they are already taking
  • Expand the editor and the frontend to support many purchase blocks
  • Ensure variable products work with purchase block

Other

  • Fix typo in package generation to include `lang` folder

You can learn more about these releases here.

Posted on Leave a comment

Sensei LMS 3.6 & WooCommerce Paid Courses 2.2 Beta Releases – Course Blocks

Sensei LMS 3.6

Sensei LMS 3.6 is now available for testing. This release introduces a number of blocks that are available when adding or editing courses:

  • Take Course button
  • Contact Teacher button
  • Course Progress
  • Course Outline

When creating a new course, these blocks are automatically added to the page for you. They are equivalent to the elements that already appear on the course page, but because they have been rewritten as blocks, it’s now possible to change how they look, adjust their order, or remove them altogether.

Course Outline Block

The course outline block is especially noteworthy. In addition to displaying the modules and lessons that make up a course, the course outline block enables you to build your course structure right inside the editor. Any modules or lessons you add to the block will be created automatically once the course is saved:

What Else is in This Release?

Here are some other enhancements and fixes you’ll find in 3.6:

  • Ensure analysis export works with RTL languages.
  • Fix incorrect rounding of maximum file size for file upload questions.
  • Ensure learners who have already viewed a quiz see the latest updates the next time they view it.
  • Remove wrapper elements from templates. This should improve the look of Sensei pages on some themes.
  • Enforce minimum PHP version of 7.0.

See the full list of changes.

Testing Sensei LMS

You can download the Sensei LMS 3.6 beta here. Alternatively, if you don’t have a staging site, you can use our Sensei LMS Test Site. Please note that the test site integrates with Smartlook to record your visit. Smartlook is GDPR compliant out of the box, and any recordings will be deleted automatically after 1 month.

WooCommerce Paid Courses 2.2

WooCommerce Paid Courses 2.2 integrates with the Take Course block, changing it to a Purchase Course button if there is a single product attached to the course, or pricing cards if there are multiple products attached to the course:

Testing WooCommerce Paid Courses

Beta testers will receive the WooCommerce Paid Courses beta directly to their inbox. If you would like to sign up to be a beta tester and have a valid license for WooCommerce Paid Courses that has not expired, please fill out the beta tester signup form using the same email address you used to purchase your license.

If you find a bug in Sensei LMS or Sensei with WooCommerce Paid Courses, please submit an issue on Github or leave a comment here. Our tentative release date is December 10th.

For Developers

If you’re a developer, here are the technical details of what’s changed in Sensei LMS 3.6.

Sensei LMS 3.6

Template File Changes

  • templates/course-results.php – Changed article element to div and removed section.
  • templates/course-results/lessons.php – Changed article element to div.
  • templates/single-course.php – Removed article and section elements.
  • templates/single-lesson.php – Removed article and section elements.
  • templates/single-message.php – Removed article and section elements.
  • templates/single-quiz.php – Removed article and section elements.

New Filters

  • sensei_block_type_args – For WordPress < 5.5, filters block arguments. For WordPress >= 5.5, use register_block_type_args instead.
  • sensei_course_complete_prerequisite_message – Filter course prerequisite message.
  • sensei_use_sensei_template: Whether to use Sensei’s templates and content wrappers.
  • sensei_use_wp_register_link – Force Sensei to output the default WordPress user registration link.

New Action

sensei_loaded: Fires once all global objects have been set in Sensei LMS.

Deprecated Functions & Methods

  • Sensei_Admin::get_lesson_order
  • Sensei_Lesson::on_lesson_published
  • Sensei_Core_Modules::reset_none_modules_transient

There are no deprecations or new hooks in WooCommerce Paid Courses 2.2.

As these are beta releases, please test them on a staging site and not your live site. If you don’t have a staging site, you can use the WP Staging plugin to create one.

Thank you to all our testers and contributors!

Posted on Leave a comment

WooCommerce Paid Courses 2.1 – Remove & Restore Enrollment

In WooCommerce Paid Courses 2.1, it’s easier than ever to remove a learner’s enrollment. No more searching for orders — learners can now be removed with a single click! And restoring their enrollment is just as easy!

With this release, we are also bumping the minimum supported version of WordPress to 5.2 and PHP to 7.0 to match WooCommerce.

Remove Enrollment

For enrolled learners, a new Remove Enrollment link is displayed when hovering over a learner in Learner Management. Clicking this link removes the learner from the course, revoking their access. The status of any order, subscription or membership associated with the learner’s enrollment is unaffected.

Please note that if the course is tied to a product, subscription or membership, and the learner purchases that product / subscription / membership again, they will be re-enrolled in the course:

Learner Management - Remove Enrollment

Restore Enrollment

Unenrolled learners who previously purchased a course can have their enrollment restored by clicking the Restore Enrollment link. This will re-enroll the learner in the course, and enrollment will once again be controlled by the associated order / subscription / membership:

Learner Management - Restore Enrollment

Enroll

Unenrolled learners who do not have an active order / subscription / membership associated with their enrollment (for example, for a free course or one where an administrator enrolled them directly via Learner Management) can be re-enrolled by clicking the Enroll link. Fundamentally it does the same thing as restoring an enrollment — it enrollers the learner in the course — only there is no order / subscription / membership controlling enrollment:

Learner Management - Enroll

We hope these changes help to streamline the management of your learners!

For Developers

If you’re a developer, here’s what you need to know about WooCommerce Paid Courses 2.1.0.

Deprecated Code

  • Sensei_WC_Paid_Courses\Course_Enrolment_Providers\WooCommerce_Simple::maybe_trigger_order_trash_change

To update, please head over to DashboardUpdates in the WordPress admin.

Please note: While we have thoroughly tested this release, it’s always possible that we’ve missed something. We recommend that you test the update on a staging site before updating your live site.

Posted on 20 Comments

Sensei LMS 3.0 & WooCommerce Paid Courses 2.0

Today we’re releasing Sensei LMS 3.0 and WooCommerce Paid Courses 2.0. These are both major releases that overhaul course access and simplify the rules for adding and removing access for learners.

Sensei LMS 3.0 and Sensei with WooCommerce Paid Courses 3.0.0.2.0.0 introduce the concept of course enrollments. When updating to the new version, a migration job will run that enrolls existing learners in courses. This means that any learner who is listed in Learner Management for a particular course prior to the migration will be enrolled in that same course after the migration.

Note: As this is a major release that affects course access, we strongly recommend that you test the update on a staging site before updating your live site. We also recommend that you take a backup of your live site prior to updating.

For sites running Sensei LMS + Sensei with WooCommerce Paid Courses: For sites that are running both Sensei LMS and Sensei with WooCommerce Paid Courses, we strongly recommend updating Sensei with WooCommerce Paid Courses first, followed by Sensei LMS. Updating Sensei LMS first would mean that learners would not have access until Sensei with WooCommerce Paid Courses was also updated.

Course Enrollments

Course enrollments make it possible to separate course progress from course access. This means that a learner can be unenrolled from a course while still keeping their existing progress intact. If that learner later re-enrolls in the course, they can continue from where they left off.

Learners can be removed from a course by clicking Remove manual enrollment or re-enrolled by clicking Manually enroll learner:

Screenshot of Learner Management page

WooCommerce Paid Courses

For paid courses, there is an important distinction between learners who were enrolled in a course because they purchased it, and those who were manually enrolled by an admin or teacher (i.e. a teacher or admin added the learner to the course even though they did not purchase it). There is a filter on the Learner Management page that can be used to view only those learners who were manually enrolled:

Special Considerations for WooCommerce Memberships

Migrating Active Memberships with Cancelled Orders

For those using WooCommerce Memberships to grant access to courses, you may see the following notice after upgrading:

In previous versions of Sensei with WooCommerce Paid Courses, a learner with an active membership and a cancelled order was not given access to the membership’s courses. This behaviour may be contrary to what you would expect, so as of Sensei with WooCommerce Paid Courses 3.0.0.2.0.0, all learners with an active membership and a cancelled order will have access to the membership’s courses. If you would like to change this behaviour for existing memberships, click the View Active Memberships with Cancelled Orders button and change the status of the memberships on that page to Cancelled.

Migrating Inactive Memberships

The default enrollment migration behaviour for learners who were granted access to a course via a membership is to enroll any learner who is listed in Learner Management for a particular course, regardless of the status of their membership. This means that learners with memberships that are paused, expired, or cancelled, but who had access to the course(s) associated with that membership prior to the migration, will still be enrolled in and have access to the course(s) after the migration.

If this is not the behaviour you desire, and would prefer NOT to enroll learners in courses if their associated membership is paused, expired, or cancelled, then please follow these instructions before updating to Sensei with WooCommerce Paid Courses 3.0.0.2.0.0. It’s important to be aware that this will remove access to courses for learners with memberships that are paused, expired, or cancelled:

  • Install and activate the Code Snippets plugin.
  • Add a new snippet that contains the following code:
    • add_filter( 'sensei_wc_paid_courses_migration_inactive_memberships_provide_manual_enrolment', '__return_false' );
  • Update Sensei with WooCommerce Paid Courses.

Improved Support for Twenty Twenty

We’ve improved support for the Twenty Twenty theme to ensure that Sensei LMS now works well across all default WordPress themes:

Developers: For new hooks, deprecations and template file changes, please see our previous beta release posts – Beta 1, Beta 2, Beta 3 and Beta 4.

When you’re ready, head over to DashboardUpdates to update Sensei LMS or Sensei with WooCommerce Paid Courses from within WordPress.