You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
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.
The text was updated successfully, but these errors were encountered: