Automattic\WooCommerce\Blocks\BlockTypes
CustomerAccount::initialize
Initialize this block type.
Method of the class: CustomerAccount{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->initialize();
CustomerAccount::initialize() CustomerAccount::initialize code WC 10.3.6
protected function initialize() {
parent::initialize();
/**
* The hooked_block_{$hooked_block_type} filter was added in WordPress 6.5.
* We are the only code adding the filter 'hooked_block_woocommerce/customer-account'.
* Using has_filter() for a compatibility check won't work because add_filter() is used in the same file.
*/
if ( version_compare( get_bloginfo( 'version' ), '6.5', '>=' ) ) {
add_filter( 'hooked_block_woocommerce/customer-account', array( $this, 'modify_hooked_block_attributes' ), 10, 5 );
add_filter( 'hooked_block_types', array( $this, 'register_hooked_block' ), 9, 4 );
}
}