Fires when the woocommerce blocks are loaded and ready to use. This hook is intended to be used as a safe event hook for when the plugin has been loaded, and all dependency requirements have been met. To ensure blocks are initialized, you must use the `woocommerce_blocks_loaded` hook instead of the `plugins_loaded` hook. This is because the functions hooked into plugins_loaded on the same priority load in an inconsistent and unpredictable manner.
N/A
Sortie :
// Ajouter une fonction au hook action 'woocommerce_blocks_loaded'
add_action('woocommerce_blocks_loaded', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee() {
// Votre code ici
error_log('Hook woocommerce_blocks_loaded déclenché');
}
Chargement des actualités...