Automattic\WooCommerce\Blocks\Templates

AbstractTemplateCompatibility::set_hook_data()protectedWC 1.0

The hook data to inject to the rendered content of blocks. This also contains hooked functions that will be removed by remove_default_hooks.

The array format: [ <hook-name> => [

block_names => [ <block-name>, ... ],
position => before|after,
hooked => [
  <function-name> => <priority>,
   ...
],

], ] Where:

  • hook-name is the name of the hook that will be replaced.
  • block-names is the array block names that hook will be attached to.
  • position is the position of the block relative to the hook.
  • hooked is an array of functions hooked to the hook that will be replaced. The key is the function name and the value is the priority.

Method of the class: AbstractTemplateCompatibility{}

No Hooks.

Return

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->set_hook_data();

AbstractTemplateCompatibility::set_hook_data() code WC 9.6.0

abstract protected function set_hook_data();