When extensions implement their equivalent blocks of the template hook functions, they can use this filter to register their old hooked data here, so in the blockified template, the old hooked functions can be removed in favor of the new blocks while keeping the old hooked functions working in classic templates. Accepts an array of hooked data. The array should be in the following format: [ [ hook => <hook-name>,
array(
Sortie :
@param array $data Additional hooked data. Default to empty @param string $class_name Class name within which the hook is called.
// Modifier la valeur avec le filtre 'woocommerce_blocks_hook_compatibility_additional_data'
add_filter('woocommerce_blocks_hook_compatibility_additional_data', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre(array() {
// Modifier la valeur
return array(;
}
Chargement des actualités...