Skip to content

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

Open

Description

@ChaseWiseman

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.

Activity

  1. added this to the v5.1.0 milestone on Nov 29, 2017
  2. changed the title [-]v5: Move the loader WP & WC version checks to the framework[/-] [+]Move the loader WP & WC version checks to the framework[/+] on Dec 2, 2017
  3. modified the milestones: v5.1.0, v5.2.0 on Feb 2, 2018
  4. removed this from the v5.2.0 milestone on Jul 24, 2018
  5. unfulvio commented on Sep 2, 2019

    @unfulvio
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ProposalProposals and proof-of-concepts

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions