woocommerce_order_email_verification_required хук-фильтрWC 7.9.0

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;
If email verification is required.
The relevant order.
The context under which we are performing this check.

Список изменений

С версии 7.9.0 Введена.

Где вызывается хук

woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php 450
return (bool) apply_filters( 'woocommerce_order_email_verification_required', $email_verification_required, $order, $context );

Где используется хук в WooCommerce

Использование не найдено.