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

Fix WooCommerce deactivation handler #952

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

bernhardkaindl
Copy link

@shewa12, the problem that this change fixes is:

Even if WooCommerce Monetization is not used, when WooCommerce gets deactivated, Tutor LMS currently adds a permanent banner at the top of the admin dashboard which only gets cleared when WooCommerce gets re-activated.

The only trick to get around this right now is to deactivate tutor, then deactivate/uninstall WooCommerce, and the re-activate tutor again, and to get the idea for this trick, you have to study the source code deeply.

Fix:

The WooCommerce deactivation handler shall only act when monetize_by === 'wc':

  • Fix: When the WooCommerce plugin gets deactivated, do not disable other possible monetization methods like Paid Memberships Pro (pmpro) or EDD.

  • Fix: When the WooCommerce plugin gets deactivated, and WooCommerce was not enabled in Tutor LMS: - Do not show a notice saying that paid courses would have been made free and to enable WooCommerce monetization to fix this.

The WooCommerce deactivation handler shall only act when
monetize_by === 'wc':

- Fix: When the WooCommerce plugin gets deactivated,
       do not disable other possible monetization methods
       like Paid Memberships Pro (pmpro) or EDD.

- Fix: When the WooCommerce plugin gets deactivated,
       and WooCommerce was not enabled in Tutor LMS:
       - Do not show a notice saying that paid courses
         would have been made free and to enable
         WooCommerce monetization to fix this.
@bernhardkaindl bernhardkaindl changed the base branch from master to dev August 7, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant