Automattic\WooCommerce\Internal\Features
FeaturesController::process_pending_declarations
Processes any pending compatibility declarations by normalizing plugin file paths and registering them internally.
This method is called lazily when compatibility information is queried (via get_compatible_features_for_plugin() or get_compatible_plugins_for_feature()). It resolves plugin IDs using PluginUtil and logs errors for unrecognized plugins. Pending declarations are cleared after processing to avoid redundant work.
Метод класса: FeaturesController{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->process_pending_declarations(): void;
Список изменений
| С версии 10.1.0 | Введена. |
Код FeaturesController::process_pending_declarations() FeaturesController::process pending declarations WC 10.3.4
private function process_pending_declarations(): void {
if ( empty( $this->pending_declarations ) ) {
return;
}
foreach ( $this->pending_declarations as $declaration ) {
[ $feature_id, $plugin_file, $positive_compatibility ] = $declaration;
// Register internally.
$this->register_compatibility_internal( $feature_id, $plugin_file, $positive_compatibility );
}
$this->pending_declarations = array();
$this->lazy = false;
}