Refactor autoloader to remove global variable (https://github.com/woocommerce/woocommerce-admin/pull/6412)
* Remove 1 global from main file * Add changelog to readme
This commit is contained in:
parent
c9e7ad7dcf
commit
79957c1014
|
@ -118,6 +118,7 @@ Release and roadmap notes are available on the [WooCommerce Developers Blog](htt
|
|||
- Dev: Change `siteUrl` to `homeUrl` on navigation site title #6240
|
||||
- Dev: Add navigation favorites data store #6275
|
||||
- Add: Add navigation intro modal. #6367
|
||||
- Tweak: Refactor autoloader to remove global variable. #6412
|
||||
- Fix: Reset Navigation submenu before making Flyout #6396
|
||||
- Dev: Add a changelog lint check to PRs. #6414
|
||||
- Fix: Move the shipping input and text 1px lower. #6408
|
||||
|
|
|
@ -28,9 +28,8 @@ use \Automattic\WooCommerce\Admin\Loader;
|
|||
* We want to fail gracefully if `composer install` has not been executed yet, so we are checking for the autoloader.
|
||||
* If the autoloader is not present, let's log the failure and display a nice admin notice.
|
||||
*/
|
||||
$autoloader = __DIR__ . '/vendor/autoload_packages.php';
|
||||
if ( is_readable( $autoloader ) ) {
|
||||
require $autoloader;
|
||||
if ( is_readable( __DIR__ . '/vendor/autoload_packages.php' ) ) {
|
||||
require __DIR__ . '/vendor/autoload_packages.php';
|
||||
} else {
|
||||
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
||||
error_log( // phpcs:ignore
|
||||
|
|
Loading…
Reference in New Issue