woocommerce_get_default_value_for_{$key}

FILTER woocommerce\src\Blocks\Domain\Services\CheckoutFields.php (ligne 1262) github
Allow providing a default value for additional fields if no value is already set.

Paramètres

Entrée :
null, $group, $wc_object
Sortie :
@param null $value The default value for the filter, always null.
@param string $group The group of this key (shipping|billing|other).
@param WC_Data $wc_object The object to get the field value for.

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_get_default_value_for_{$key}'
add_filter('woocommerce_get_default_value_for_{$key}', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(null) {
    // Modifier la valeur
    return null;
}

Actualités

Chargement des actualités...