woocommerce_valid_webhook_events

FILTER woocommerce\includes\wc-webhook-functions.php (ligne 120) github
Check if the given topic is a valid webhook topic, a topic is valid if: + starts with `action.woocommerce_` or `action.wc_`. + it has a valid resource & event.

Paramètres

Entrée :
array( 'created', 'updated', 'deleted', 'restored'
Sortie :
@param  string $topic Webhook topic.
@return bool

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_valid_webhook_events'
add_filter('woocommerce_valid_webhook_events', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(array( 'created') {
    // Modifier la valeur
    return array( 'created';
}

Actualités

Chargement des actualités...