GithubHelp home page GithubHelp logo

Comments (19)

 avatar commented on May 13, 2024 2

Do you think it worth adding a bit to that compat plugin message too.

"Make sure to delete WooCommerce first before installing and activating the Compitbility Plugin. Deleting WooCommerce will not remove your products, settings and other data."

from classic-commerce.

zulfgani avatar zulfgani commented on May 13, 2024 1

The way the gist works is the way I and my client would expect it to work. Deleting WooCommerce should on be advised once (a): a user is satisfied with switching to Classic Commerce and (b): they wish to use one of the Woo extensions that requires/checks for woocommerce/woocommerce.php as a way of detection.

Testing performed with added code from gist.

Classic Commerce & WooCommerce both installed:
WooCommerce active: Trying to activated CC I get the Notice as intended.
Deactivated Woo & Activated CC: No issues, CC activates as it should.
Activate CC: I get the notice re compatibility.

Classic Commerce & Compatibility plugin both installed:
Activated Compatibility plugin: Notice goes away and any extension functions as it should

Result: Happy customer + Happy developer πŸ‘

from classic-commerce.

timbocode avatar timbocode commented on May 13, 2024 1

Thanks for the feedback @zulfgani

from classic-commerce.

bahiirwa avatar bahiirwa commented on May 13, 2024

I have reproduced the issue with several later versions of Woocommerce. It is simple, one needs to delete the woocommerce plugin to make room for cc plugin.

We need to change wording to "delete" instead of "uninstall". When woo is deleted, I am able to use cc.

from classic-commerce.

 avatar commented on May 13, 2024

When did this change and why? It used to be possible. I don't think it's a good move. People will want to try out CC without fully deleting WC. That was the nice thing about installing CC... you could switch between the two very easily and see what had changed. Telling people they need to fully delete WC before they can even look at CC is a big deterrent.

from classic-commerce.

zulfgani avatar zulfgani commented on May 13, 2024

The issue here stems from the check that fires the cc_wc_already_active_notice function - it is somewhat wrong to assume WC is active merely on the presence of the checked files.

The check should also check for the existence of either the Class WC or WooCommerce as well in order to ascertain that indeed it's the actual WC plugin that is a) installed and b) active or if it is the compatibility plugin that is installed and active.

Since both the WC and compatibility can not be installed at the same time then above function should only be concerned with WC and deactivated CC only and if the true WC is active. This will allow for both CC & WC to be installed at the same time and either one can be activated in lieu of the other.

from classic-commerce.

bahiirwa avatar bahiirwa commented on May 13, 2024

@zulfgani please refer to #144 and #152

For someone to test CC with other extensions that verify for woocommerce, they need to install the compatibility plugin and this need to have woo deleted. We chose a path not to rename files and folders for the compat plugin. So we instantly ask for woo delete. If user needs to go back to woo, they can simply install plugin back in plugins folder. Data is not deleted in any instance of switching. They could also rename their woo folder in plugin if they are testing and rename if they don’t like CC.

from classic-commerce.

 avatar commented on May 13, 2024

For someone to test CC with other extensions that verify for woocommerce, they need to install the compatibility plugin and this need to have woo deleted.

Yes, IF that is the case they will need to do that.

OK, so at the moment I have CC installed and not activated. And I have WC installed. Just to test out CC I have to deactivate WC, then try and delete it at which point I get this message:

image

There is no way I am going to go ahead with that and risk destroying my whole shop.

Result: Well, let's just forget about CC.

from classic-commerce.

nylen avatar nylen commented on May 13, 2024

The behavior described in this issue seems pretty broken. Deactivating WooCommerce should be sufficient to try Classic Commerce without the compatibility plugin installed, and it is also not clear from the error message what is going on.

from classic-commerce.

timbocode avatar timbocode commented on May 13, 2024

Can someone (@simplycomputing, @bahiirwa) try this gist to see if it resolves the problem https://gist.github.com/timbocode/611bae209b42bb7885f9247b854b5592

Just replace classic-commerce.php with the above.

Or for the quick version, replace line 36 with this:

if ( file_exists( WP_PLUGIN_DIR . '/woocommerce/woocommerce.php' ) && file_exists( WP_PLUGIN_DIR . '/woocommerce/includes/class-woocommerce.php' ) && is_plugin_active( 'woocommerce/woocommerce.php' ) ) {

Test in a variety of scenarios.

from classic-commerce.

timbocode avatar timbocode commented on May 13, 2024

There is no way I am going to go ahead with that and risk destroying my whole shop.

We've already covered the scary WC message in the FAQ under "How do I switch over from using WooCommerce to using Classic Commerce? Is it safe to uninstall WooCommerce?"

I don't know how we make it any clearer that deleting WC will not delete data. If anyone has a brainwave, feel free to comment. Is there a hook that allows us to change the message for instance?

from classic-commerce.

 avatar commented on May 13, 2024

No-one read docs first up before installing a plugin. Usual sequence is: install -> activate -> try -> problem -> docs.

Is there really no way to tell that you have the real WC installed and not the compat plugin?

EDIT: sorry, missed the gist above There is a way. :-)

from classic-commerce.

timbocode avatar timbocode commented on May 13, 2024

If you delete WC, you get the "Are you sure you want to delete WooCommerce and its data" message.

If you delete the compat plugin, you get "Are you sure you want to delete CC Compatibility for Woo Addons and its data?"

So the messages are different but they both have the "and its data" bit at the end. This must be a CP/WP thing and the only way of changing it would be via a hook - if one exists. Perhaps @nylen would know?

The gist above should fix the WC detection issue. That needs testing.

from classic-commerce.

 avatar commented on May 13, 2024

Brilliant. First try on the site I was trying to do before now works perfectly:

image

from classic-commerce.

 avatar commented on May 13, 2024

That's how I think it should be. IF you want the compatability plugin you can delete Woo. But it gives you an opportunity to have a look at CC first.

from classic-commerce.

timbocode avatar timbocode commented on May 13, 2024

So is it looking good then?

from classic-commerce.

 avatar commented on May 13, 2024

Yes, I'm not sure how to

Test in a variety of scenarios.

It works. Anything else you'd like me to test? I switched back and forward a few times.

from classic-commerce.

timbocode avatar timbocode commented on May 13, 2024

Just any scenario a typical user - or more to the point, a tester - might come across. Can't think of anything specific really and it sounds like you've tested it thoroughly so we can probably do an alpha3 PR for this now.

from classic-commerce.

timbocode avatar timbocode commented on May 13, 2024

Good idea.

from classic-commerce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.