woocommerce_order_email_verification_grace_period

FILTER woocommerce\src\Internal\Utilities\Users.php (ligne 111) github
Controls the grace period within which we do not require any sort of email verification step before rendering the 'order received' or 'order pay' pages. To eliminate the grace period, set to zero (or to a negative value). Note that this filter is not invoked at all if email verification is deemed to be unnecessary (in other words, it cannot be used to force verification in *all* cases).

Paramètres

Entrée :
10 * MINUTE_IN_SECONDS, $order, $context
Sortie :
@param int      $grace_period Time in seconds after an order is placed before email verification may be required.
@param WC_Order $this         The order for which this grace period is being assessed.
@param string   $context      Indicates the context in which we might verify the email address. Typically 'order-pay' or 'order-received'.

Utilisation

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

function ma_fonction_filtre(10 * MINUTE_IN_SECONDS) {
    // Modifier la valeur
    return 10 * MINUTE_IN_SECONDS;
}

Actualités

Chargement des actualités...