pre_get_product_search_form

ACTION woocommerce\includes\wc-template-functions.php (ligne 3277) github
Display product search form. Will first attempt to locate the product-searchform.php file in either the child or. the parent, then load it. If it doesn't exist, then the default search form. will be displayed. The default searchform uses html5.

Paramètres

Entrée :
N/A
Sortie :
@param bool $echo (default: true).
@return string

Utilisation

// Ajouter une fonction au hook action 'pre_get_product_search_form'
add_action('pre_get_product_search_form', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee() {
    // Votre code ici
    error_log('Hook pre_get_product_search_form déclenché');
}

Actualités

Chargement des actualités...