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

Move the loader WP & WC version checks to the framework #254

Open
ChaseWiseman opened this issue Nov 29, 2017 · 1 comment
Open

Move the loader WP & WC version checks to the framework #254

ChaseWiseman opened this issue Nov 29, 2017 · 1 comment
Labels
Proposal Proposals and proof-of-concepts

Comments

@ChaseWiseman
Copy link
Contributor

Right now our plugin loader checks for the required PHP, WordPress, and WooCommerce versions before loading the plugin itself: https://github.com/skyverge/wc-plugin-framework/blob/release-v5/woocommerce/woocommerce-framework-plugin-loader-sample.php#L119-L121

We could try and move the WP & WC version checks to the plugin base class itself to help keep the Loader class as minimal as possible. Also consider moving all of the dependency logic to its own handler class to clean things up event further.

@ChaseWiseman ChaseWiseman added this to the v5.1.0 milestone Nov 29, 2017
@ChaseWiseman ChaseWiseman removed the v5 label Dec 2, 2017
@ChaseWiseman ChaseWiseman changed the title v5: Move the loader WP & WC version checks to the framework Move the loader WP & WC version checks to the framework Dec 2, 2017
@ChaseWiseman ChaseWiseman modified the milestones: v5.1.0, v5.2.0 Feb 2, 2018
@ChaseWiseman ChaseWiseman removed this from the v5.2.0 milestone Jul 24, 2018
@unfulvio
Copy link
Member

unfulvio commented Sep 2, 2019

A way to do this could be to create another loader project to be required by composer. The loader could be instantiated via variables from the plugin main file (defining things like plugin name, version requirements, some custom messages).

The drawback here is that since it couldn't be namespaced for versioning one would have to be very careful in not introducing any BC change.

Possibly the loading system could be akin to that of the Action Scheduler which IIRC doesn't rely on namespaces either and doesn't run into these issues.

@unfulvio-godaddy unfulvio-godaddy added Proposal Proposals and proof-of-concepts and removed bootstrap Feature labels Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposal Proposals and proof-of-concepts
Projects
None yet
Development

No branches or pull requests

3 participants