woocommerce_order_email_verification_grace_period
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.
Usage
add_filter( 'woocommerce_order_email_verification_grace_period', 'wp_kama_woocommerce_order_email_verification_grace_period_filter', 10, 3 );
/**
* Function for `woocommerce_order_email_verification_grace_period` filter-hook.
*
* @param int $grace_period Time in seconds after an order is placed before email verification
* may be required.
* @param \WC_Order $order 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'.
*
* @return int
*/
function wp_kama_woocommerce_order_email_verification_grace_period_filter( $grace_period, $order, $context ){
// filter...
return $grace_period;
}
- $grace_period(int)
- Time in seconds after an order is placed before email verification may be required.
- $order(\WC_Order)
- The order for which this grace period is being assessed.
- $context(string)
- Indicates the context in which we might verify the email address. Typically 'order-pay' or 'order-received'.
Changelog
| Since 11.4.0 | Introduced. |
Where the hook is called
woocommerce_order_email_verification_grace_period
woocommerce_order_email_verification_grace_period
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/AbstractOrderConfirmationBlock.php 160
$verification_grace_period = (int) apply_filters( 'woocommerce_order_email_verification_grace_period', 10 * MINUTE_IN_SECONDS, $order, 'order-received' );
woocommerce/src/Internal/Utilities/Users.php 111
$verification_grace_period = (int) apply_filters( 'woocommerce_order_email_verification_grace_period', 10 * MINUTE_IN_SECONDS, $order, $context );