Automattic\WooCommerce\Internal\POS
POSController::register
Register the feature surface.
The feature-flag check is deferred to on_init because feature_is_enabled() walks FeaturesController::init_feature_definitions(), which contains __( ...,'woocommerce') calls. Evaluating those before init triggers WP 6.7's "translation loading … too early" notice (and the headers-already-sent cascade that follows).
Метод класса: POSController{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$POSController = new POSController(); $POSController->register(): void;
Список изменений
| С версии 11.0.0 | Введена. |
Код POSController::register() POSController::register WC 11.2.2
public function register(): void {
add_action( 'init', array( $this, 'on_init' ) );
}