woocommerce_order_email_verification_required
Provides an opportunity to override the (potential) requirement for shoppers to verify their email address before we show information such as the order summary, or order payment page.
Note that this hook is not always triggered, therefore it is (for example) unsuitable as a way of forcing email verification across all order confirmation/order payment scenarios. Instead, the filter primarily exists as a way to remove the email verification step.
Использование
add_filter( 'woocommerce_order_email_verification_required', 'wp_kama_woocommerce_order_email_verification_required_filter', 10, 3 ); /** * Function for `woocommerce_order_email_verification_required` filter-hook. * * @param bool $email_verification_required If email verification is required. * @param WC_Order $order The relevant order. * @param string $context The context under which we are performing this check. * * @return bool */ function wp_kama_woocommerce_order_email_verification_required_filter( $email_verification_required, $order, $context ){ // filter... return $email_verification_required; }
- $email_verification_required(true|false)
- If email verification is required.
- $order(WC_Order)
- The relevant order.
- $context(строка)
- The context under which we are performing this check.
Список изменений
С версии 7.9.0 | Введена. |
Где вызывается хук
woocommerce_order_email_verification_required
woocommerce_order_email_verification_required
woocommerce/src/Internal/Utilities/Users.php 107
return (bool) apply_filters( 'woocommerce_order_email_verification_required', $email_verification_required, $order, $context );
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/AbstractOrderConfirmationBlock.php 230
return (bool) apply_filters( 'woocommerce_order_email_verification_required', true, $order, 'order-received' );