Plugin Directory

Changeset 2968811


Ignore:
Timestamp:
09/19/2023 03:42:55 PM (3 years ago)
Author:
clearoutio
Message:

Minor Enhancements

Location:
clearout-email-validator/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • clearout-email-validator/trunk/plugin.php

    r2961086 r2968811  
    44 * Plugin URL:   https://developer.wordpress.org/plugins/clearout-email-validator
    55 * Description:  This plugin seamlessly integrated with all major forms to validate the user's given email address in real-time. Under the hood, this plugin use Clearout API to perform 20+ refined validation checks to determine the status of the email address, and thus helps capturing only the valid leads to maintain high quality mailing list.
    6  * Version:      3.0.2
     6 * Version:      3.0.3
    77 * Author:       Clearout.io
    88 * Author URI:   https://clearout.io
     
    1414
    1515// plugin version.
    16 define( 'CLEAROUT_PLUGIN_VERSION', '3.0.2' );
     16define( 'CLEAROUT_PLUGIN_VERSION', '3.0.3' );
    1717define( 'CLEAROUT_RESULT_CACHED_TIMEOUT', 3600 );
    1818define( 'CLEAROUT_BASE_API_URL', 'https://api.clearout.io/v2/' );
  • clearout-email-validator/trunk/readme.txt

    r2961086 r2968811  
    313313= 3.0.2 =
    314314* Minor Fixes
     315= 3.0.3 =
     316* Gravity Form Fixes
  • clearout-email-validator/trunk/src/clearout-validator.php

    r2958288 r2968811  
    320320function _get_error_message( $error_status ) {
    321321    $error_message = 'This email address is invalid or not allowed - please check';
    322     switch ( $error_status ) {
     322    switch ($error_status) {
    323323        case 'api_token':
    324324            $message = 'Invalid API Token, please check your API token';
     
    522522        }
    523523        // do the email validation.
    524         $validation_result = _co_email_validation( $value, $clearout_options, $clearout_form_source );
     524
     525        // Check if $value is array, because when user has double confirm email enabled,
     526        // $value comes as an array, causing our EV to fail
     527        $email = $value;
     528        if ( is_array( $value ) ) {
     529            $email = $value[0];
     530        }
     531        $sanitised_email = sanitize_email($email);
     532        $validation_result = _co_email_validation( $sanitised_email, $clearout_options, $clearout_form_source );
    525533        if ( ( is_array( $validation_result ) ) && array_key_exists( 'status', $validation_result ) ) {
    526534            if ( false == $validation_result['status'] ) {
Note: See TracChangeset for help on using the changeset viewer.