Automattic\WooCommerce\Blocks\BlockTypes

ProductFilterAttribute::initialize()protectedWC 1.0

Initialize this block type.

  • Hook into WP lifecycle.
  • Register the block with WordPress.

Метод класса: ProductFilterAttribute{}

Хуков нет.

Возвращает

null. Ничего (null).

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

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

Код ProductFilterAttribute::initialize() WC 9.4.2

protected function initialize() {
	add_filter( 'block_type_metadata_settings', array( $this, 'add_block_type_metadata_settings' ), 10, 2 );
	parent::initialize();

	add_filter( 'collection_filter_query_param_keys', array( $this, 'get_filter_query_param_keys' ), 10, 2 );
	add_filter( 'collection_active_filters_data', array( $this, 'register_active_filters_data' ), 10, 2 );
	add_action( 'deleted_transient', array( $this, 'delete_default_attribute_id_transient' ) );
	add_action( 'wp_loaded', array( $this, 'register_block_patterns' ) );
}