woocommerce_qr_login_should_send_signin_email
Filter whether to send the QR sign-in notification email.
Default: true. Return false to suppress the send for a specific user, environment (e.g. staging), or test run.
Usage
add_filter( 'woocommerce_qr_login_should_send_signin_email', 'wp_kama_woocommerce_qr_login_should_send_signin_email_filter', 10, 3 ); /** * Function for `woocommerce_qr_login_should_send_signin_email` filter-hook. * * @param bool $should_send Whether to send the email. * @param \WP_User $user The user who minted the QR token. * @param array$consumed_record The consumed record about to be emailed (keys: consumed_at, user_id, ap_uuid, ap_name, device). * * @return bool */ function wp_kama_woocommerce_qr_login_should_send_signin_email_filter( $should_send, $user, $consumed_record ){ // filter... return $should_send; }
- $should_send(true|false)
- Whether to send the email.
- $user(\WP_User)
- The user who minted the QR token.
- $consumed_record(array<string,)
- mixed> $consumed_record The consumed record about to be emailed (keys: consumed_at, user_id, ap_uuid, ap_name, device).
Changelog
| Since 10.9.0 | Introduced. |
Where the hook is called
woocommerce_qr_login_should_send_signin_email
woocommerce/src/Admin/API/MobileAppQRLogin.php 2000-2005
$should_send = (bool) apply_filters( 'woocommerce_qr_login_should_send_signin_email', true, $user, $consumed_record );