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

Change folder name on plugin download and activate it. #3

Closed
bahiirwa opened this issue Dec 25, 2019 · 5 comments
Closed

Change folder name on plugin download and activate it. #3

bahiirwa opened this issue Dec 25, 2019 · 5 comments

Comments

@bahiirwa
Copy link
Collaborator

bahiirwa commented Dec 25, 2019

As agreed in ClassicPress/classic-commerce#131 (comment)

  1. We have delegated the uninstallation of the WooCommerce plugin to the website owner.
  2. This plugin on install and activation runs under the folder named cc-compat-woo with file woocommerce.php
  3. We need to rewrite its name to folder named woocommerce with file woocommerce.php
  4. Issue arises - CP will reocgnize the that plugin cc-compat-woo/woocommerce.php is no longer active in the plugins_options array. With this, the newly renamed woocommerce/woocommerce.php* won't work. It is inactive until activated again.
  5. The Challenge is rename the folder and activate it.

Of course this is easy for an experiences developer to use a command line and accomplish all these tasks. How do we get the ordinary user who downloaded this plugin to do these tasks in one click of the button?

@timbocode
Copy link
Contributor

I've been thinking about this too and came to the conclusion that perhaps the easiest thing to do is to rename the repo from cc-compat-woo to woocommerce. I know this isn't ideal but in the interests of keeping things simple, it would seem the most reasonable option to me?

@bahiirwa
Copy link
Collaborator Author

Solution: changing repo name.

@timbocode
Copy link
Contributor

Temporarily reopening this further to Slack discussions.

Repo name to stay cc-compat-woo.

Use the following command to create an archive that extracts to woocommerce/woocommerce.php:

git archive --prefix=woocommerce/ -o "woocommerce.zip" HEAD

and then upload this to GitHub when a release is created.

@timbocode timbocode reopened this Dec 27, 2019
@bahiirwa
Copy link
Collaborator Author

As advised, we need to make this a bash script.

@timbocode
Copy link
Contributor

Closed with issue #7

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

No branches or pull requests

2 participants