Comments (19)
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.
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.
Thanks for the feedback @zulfgani
from classic-commerce.
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.
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.
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.
@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.
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:
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.
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.
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.
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.
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.
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.
Brilliant. First try on the site I was trying to do before now works perfectly:
from classic-commerce.
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.
So is it looking good then?
from classic-commerce.
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.
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.
Good idea.
from classic-commerce.
Related Issues (20)
- Downloadable and virtual products support HOT 2
- Add link in settings page to relaunch ClassicCommerce wizard and/or button to automatically create the pages ClassicCommerce needs HOT 3
- PHP notice: Undefined index: _low_stock_amount
- Implement custom database tables (eg. for orders) HOT 2
- Problem in WC_AJAX::add_to_cart()
- Wrong WC_Data_Store in function wc_update_product_stock()
- Calling wp_die() in the AJAX handlers of WC_AJAX makes it difficult to reuse code.
- replace get_post_status( $product_id ) with $product->get_status() in WC_AJAX::add_to_cart()
- Constructing objects using "$some_object = new Some_Class()" makes subclassing difficult.
- Backport fix for issue #27170 in WooCommerce related to missing product type dropdown HOT 15
- Include an automated check of WC version compatibility in plugins HOT 2
- wc_maybe_adjust_line_item_product_stock() HOT 1
- After deleting an order item the product is not restocked
- Request for additional actions for function wc_update_product_stock() HOT 4
- Check security fixes applied to WC since 3.5.3 HOT 2
- Sale ends at 00:00 instead of 11:59 PM on set day HOT 1
- Do we change WC version number in CC PR? HOT 2
- Travis Build tests failing. Move to Github Actions HOT 1
- Custom settings sections don't works HOT 3
- is_api_request function for MWP Hubspot Integration (and others) plugin(s)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from classic-commerce.