Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add compat plugin optional install admin notice #150

Merged
merged 5 commits into from
Dec 25, 2019

Conversation

bahiirwa
Copy link
Collaborator

All Submissions:

PR is to fulfill requirements of #144. Check other information below.

Changes proposed in this Pull Request:

  • Add admin notice warning user of compatibility plugin and issues it solves.
  • Add button to download the compat plugin.
  • Add section to extensions page describing the compat plugin.
  • Admin notice is persistent unless dismissed. It also returns on deactivation & re-activation of plugin.

Screenshot 2019-12-22 at 13 31 57

I hit a wall trying to detect if another plugin is using the particular lines of code. However, we can compensate for this by warning the user the issues that might arise. Leave the user to make the decision.

Closes #144 .

How to test the changes in this Pull Request:

  1. Install classic-commerce into plugins and activate plugin.

@bahiirwa bahiirwa added this to the Version 1.0.0 milestone Dec 22, 2019
@bahiirwa bahiirwa requested a review from timbocode December 22, 2019 11:23
@timbocode
Copy link
Contributor

Looks good. The only thing I would add is a note saying that the compat plugin and WooCommerce cannot be installed at the same time. So, if they need the compat plugin and they've got WC installed (but deactivated), they will need to remove WC first. Something along those lines. Otherwise, it looks good.

@bahiirwa
Copy link
Collaborator Author

That’s a good catch. I was hoping to solve the Woo - CC via #136 (comment)

You are right about the compat plugin needing WC deleted to leave room for the New file woocommerce/woocommerce.php

@zulfgani
Copy link
Contributor

zulfgani commented Dec 23, 2019

A few issues to consider.

CC-WC-Compat

a) Notice No.1 is generated by plugin No.2 - a WooCommerce extension.
b) Plugin No.3 is the supposed Compatibility plugin. This needs to be named as - Folder name: woocommerce + File name: woocommerce.php for Notice No.1 to go away and plugin No.2 to work.

c) Notice No.4 should detect that plugin No.3 is active and therefore not display at all.

This Gist works to resolve these but for (c)

@timbocode
Copy link
Contributor

It is the intention that the compat plugin will be woocommerce/woocommerce.php. We've had various discussions around this as it means that the compat plugin and the real WC can't be installed at the same time.

I think we've agreed on the name "CC Compatibility for WooCommerce" or "CC Compat with WooCommerce", something along those lines. It definitely shouldn't be WooCommerce Placeholder or WooCommerce Anything as this violates Automattic's trademarks etc.

The WooCommerce Category Slider plugin works for me without the compat plugin. CC being active is enough. From your screenshot, it looks like you may have an older version of CC installed. We made some changes in PR #146 to improve CC compatibility.

Copy link
Contributor

@timbocode timbocode left a comment

Choose a reason for hiding this comment

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

That’s a good catch. I was hoping to solve the Woo - CC via #136 (comment)

We still need a message to say that the compat plugin and WC cannot co-exist. Where do you propose to put this?

@bahiirwa
Copy link
Collaborator Author

That’s a good catch. I was hoping to solve the Woo - CC via #136 (comment)

We still need a message to say that the compat plugin and WC cannot co-exist. Where do you propose to put this?

We need to add this to the addons extensions page under the ClassicCommerce compat plugin text. #144 should have taken this in. But a simple PR can suffice.

@bahiirwa
Copy link
Collaborator Author

@zulfgani

This Gist works to resolve these but for (c)

Do you mind making some PRs to https://github.com/Classic-Commerce/cc-compat-woo? We should start making progress on this.

@timbocode
Copy link
Contributor

We need to add this to the addons extensions page under the ClassicCommerce compat plugin text. #144 should have taken this in.

Either #150 (this one) or #144. Both are still open. Could you not add another commit?

@bahiirwa
Copy link
Collaborator Author

I have made some adjustments

A simple note in the extensions notes

Screenshot 2019-12-25 at 11 54 07

Another simple note to the notice that can be dismissed for quick glance.
Screenshot 2019-12-25 at 11 53 49

@ghost
Copy link

ghost commented Dec 25, 2019

Looks good! Small fix: You have "First uninstall Woocommerce inorder..." - should be "in order"

@timbocode
Copy link
Contributor

Good for merge when small typo fixed.

@zulfgani
Copy link
Contributor

Should there be an additional note in the FAQ explaining this and how to "uninstall" WooCommerce? - some users may not know what uninstall means let alone how to do it.

@bahiirwa bahiirwa closed this Dec 25, 2019
@bahiirwa bahiirwa reopened this Dec 25, 2019
@bahiirwa bahiirwa merged commit efb3e01 into ClassicPress:develop Dec 25, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display dismissible admin notice if CC detects that WC compat not installed
3 participants