Automattic\WooCommerce\Blocks
BlockTypesController::init
Initialize class features.
Method of the class: BlockTypesController{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->init();
BlockTypesController::init() BlockTypesController::init code WC 10.4.3
protected function init() { // phpcs:ignore WooCommerce.Functions.InternalInjectionMethod.MissingPublic
add_action( 'init', array( $this, 'register_blocks' ) );
add_action( 'wp_loaded', array( $this, 'register_block_patterns' ) );
add_filter( 'block_categories_all', array( $this, 'register_block_categories' ), 10, 2 );
add_filter( 'render_block', array( $this, 'add_data_attributes' ), 10, 2 );
add_action( 'woocommerce_login_form_end', array( $this, 'redirect_to_field' ) );
add_filter( 'widget_types_to_hide_from_legacy_widget_block', array( $this, 'hide_legacy_widgets_with_block_equivalent' ) );
add_action( 'woocommerce_delete_product_transients', array( $this, 'delete_product_transients' ) );
add_filter( 'register_block_type_args', array( $this, 'enqueue_block_style_for_classic_themes' ), 10, 2 );
}