gpdtc_delta_warning_email_recipient

  1. Description
  2. Usage
  3. Parameters
  4. Example
    1. Change email address that receives the max delta warning messages.
  5. Since

Description

Filter which e-mail address should be sent an e-mail if GF Date Time Calculator detects a submission with a calculation result exceeding the max delta.

Usage

add_filter( 'gpdtc_delta_warning_email_recipient', 'my_custom_function', 10, 4 );

Parameters

  • $to string

    The email address that will be sent any rejected calculation notice e-mails.

    Default: Admin e-mail set in WordPress settings

  • $field \GF_Field

    Current field object

  • $form array

    Current form array

  • $entry array

    Current entry

Example

Change email address that receives the max delta warning messages.

This example changes the email address that will receive the max delta warning messages for a specific form and field.

add_filter( 'gpdtc_delta_warning_email_recipient', function( $to, $field, $form, $entry){
  // Change 123 to the form ID and change 10 to the field ID
   if ($form['id'] == '123' && $field['id'] == '10'){
     $to = 'new@example.com';
 }
   return $to;
 }, 10, 4 );

Since

This filter is available since GF Date Time Calculator 1.0-beta-4.0.