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

oik-lib should follow the fallback route if a registered library is not found #3

Open
bobbingwide opened this issue Oct 27, 2016 · 1 comment
Assignees
Labels

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Oct 27, 2016

Problem statement

In one of my development environments ( qw/wp44 ), when testing the plugin update logic in oik-weight-zone-shipping-pro, I had deactivated all plugins except for oik-weight-zone-shipping-pro and the mu_plugins, which included oik-lib. When oik-lib used the require_lib() method to load the 'class-bobbcomp' library, since oik-weight-zone-shipping-pro had not registered the libraries that it has included in the libs folder, the library file was not 'found' so it wasn't loaded. The directory had however been identified using oik_lib_fallback().

Proposed solution

oik-lib should attempt to locate a library file using the fallback method. This is the technique that a plugin such as oik-weight-zone-shipping-pro, which does not have a dependency on oik, expects to be used.

Workaround

Deactivate the mu-plugins as well. One method is to rename the folder.

@bobbingwide
Copy link
Owner Author

There is a similar problem in WordPress Multisite when loading wp-admin on a secondary site, where the library file being loaded has not yet been registered. The fallback logic doesn't get invoked when the OIK_libs class is loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant