WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Installer::removeDisabledInstallers() protected WC 1.0

Look for installers set to be disabled in composer's extra config and remove them from the list of supported installers.

Globals:

  • true, "all", and "*" - disable all installers.
  • false - enable all installers (useful with
wikimedia/composer-merge-plugin or similar)

Это метод класса: Installer{}

Хуков нет.

Возвращает

null.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->removeDisabledInstallers();

Код Installer::removeDisabledInstallers: woocommerce/vendor/composer/installers/src/Composer/Installers/Installer.php WC 4.5.2

<?php
protected function removeDisabledInstallers()
{
    $extra = $this->composer->getPackage()->getExtra();

    if (!isset($extra['installer-disable']) || $extra['installer-disable'] === false) {
        // No installers are disabled
        return;
    }

    // Get installers to disable
    $disable = $extra['installer-disable'];

    // Ensure $disabled is an array
    if (!is_array($disable)) {
        $disable = array($disable);
    }

    // Check which installers should be disabled
    $all = array(true, "all", "*");
    $intersect = array_intersect($all, $disable);
    if (!empty($intersect)) {
        // Disable all installers
        $this->supportedTypes = array();
    } else {
        // Disable specified installers
        foreach ($disable as $key => $installer) {
            if (is_string($installer) && key_exists($installer, $this->supportedTypes)) {
                unset($this->supportedTypes[$installer]);
            }
        }
    }
}