WooCommerce::init_hooks()privateWC 2.3

Hook into actions and filters.

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

Хуков нет.

Возвращает

null. Ничего.

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

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

Список изменений

С версии 2.3 Введена.

Код WooCommerce::init_hooks() WC 6.9.4

private function init_hooks() {
	register_activation_hook( WC_PLUGIN_FILE, array( 'WC_Install', 'install' ) );
	register_shutdown_function( array( $this, 'log_errors' ) );

	add_action( 'plugins_loaded', array( $this, 'on_plugins_loaded' ), -1 );
	add_action( 'admin_notices', array( $this, 'build_dependencies_notice' ) );
	add_action( 'after_setup_theme', array( $this, 'setup_environment' ) );
	add_action( 'after_setup_theme', array( $this, 'include_template_functions' ), 11 );
	add_action( 'init', array( $this, 'init' ), 0 );
	add_action( 'init', array( 'WC_Shortcodes', 'init' ) );
	add_action( 'init', array( 'WC_Emails', 'init_transactional_emails' ) );
	add_action( 'init', array( $this, 'add_image_sizes' ) );
	add_action( 'init', array( $this, 'load_rest_api' ) );
	add_action( 'switch_blog', array( $this, 'wpdb_table_fix' ), 0 );
	add_action( 'activated_plugin', array( $this, 'activated_plugin' ) );
	add_action( 'deactivated_plugin', array( $this, 'deactivated_plugin' ) );
	add_action( 'woocommerce_installed', array( $this, 'add_woocommerce_inbox_variant' ) );
	add_action( 'woocommerce_updated', array( $this, 'add_woocommerce_inbox_variant' ) );

	// These classes set up hooks on instantiation.
	$container = wc_get_container();
	$container->get( ProductDownloadDirectories::class );
	$container->get( DownloadPermissionsAdjuster::class );
	$container->get( AssignDefaultCategory::class );
	$container->get( DataRegenerator::class );
	$container->get( LookupDataStore::class );
	$container->get( RestockRefundedItemsAdjuster::class );
	$container->get( CustomOrdersTableController::class );
	$container->get( OptionSanitizer::class );
	$container->get( BatchProcessingController::class );
}