Open bobbingwide opened 8 years ago
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.
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.