Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories\Admin

UI::init_hooks()publicWC 1.0

Performs any work needed to add hooks and otherwise integrate with the wider system, except in the case where the current user is not a site administrator, no hooks will be initialized.

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

Хуков нет.

Возвращает

null. Ничего.

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

$UI = new UI();
$UI->init_hooks();

Код UI::init_hooks() WC 6.8.0

final public function init_hooks() {
	if ( ! Users::is_site_administrator() ) {
		return;
	}

	add_filter( 'woocommerce_get_sections_products', array( $this, 'add_section' ) );
	add_action( 'load-woocommerce_page_wc-settings', array( $this, 'setup' ) );
	add_action( 'woocommerce_settings_products', array( $this, 'render' ) );
}