woocommerce_blocks_(registry_identifier)_registration
Fires when the IntegrationRegistry is initialized.
Runs before integrations are initialized allowing new integration to be registered for use. This should be used as the primary hook for integrations to include their scripts, styles, and other code extending the blocks.
Usage
add_action( 'woocommerce_blocks_(registry_identifier)_registration', 'wp_kama_woocommerce_blocks_registry_identifier_registration_action' ); /** * Function for `woocommerce_blocks_(registry_identifier)_registration` action-hook. * * @param IntegrationRegistry $that Instance of the IntegrationRegistry class which exposes the IntegrationRegistry::register() method. * * @return void */ function wp_kama_woocommerce_blocks_registry_identifier_registration_action( $that ){ // action... }
- $that(IntegrationRegistry)
- Instance of the IntegrationRegistry class which exposes the IntegrationRegistry::register() method.
Changelog
Since 4.6.0 | Introduced. |
Where the hook is called
woocommerce_blocks_(registry_identifier)_registration
woocommerce/src/Blocks/Integrations/IntegrationRegistry.php 50
do_action( 'woocommerce_blocks_' . $this->registry_identifier . '_registration', $this );
Where the hook is used in WooCommerce
woocommerce/src/Blocks/Payments/Api.php 50
add_action( 'woocommerce_blocks_payment_method_type_registration', array( $this, 'register_payment_method_integrations' ) );