Plugin Directory

Changeset 2726689


Ignore:
Timestamp:
05/19/2022 10:16:04 AM (4 years ago)
Author:
clearoutio
Message:

Major Fixes and Woocommerce form improvements

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

Legend:

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

    r2707409 r2726689  
    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:      1.7.12
     6* Version:      2.0.0
    77* Author:       Clearout.io
    88* Author URI:   https://clearout.io
     
    1313
    1414// plugin version.
    15 define('CLEAROUT_PLUGIN_VERSION', '1.7.12');
     15define('CLEAROUT_PLUGIN_VERSION', '2.0.0');
    1616define('CLEAROUT_RESULT_CACHED_TIMEOUT', 10800);
    1717define('CLEAROUT_BASE_API_URL', "https://api.clearout.io/v2/");
    18 define("CLEAROUT_EMAIL_VERIFY_API_URL", CLEAROUT_BASE_API_URL . "email_verify/instant?v=" . CLEAROUT_PLUGIN_VERSION);
     18define("CLEAROUT_EMAIL_VERIFY_API_URL", CLEAROUT_BASE_API_URL . "wordpress/email_verify?v=" . CLEAROUT_PLUGIN_VERSION);
    1919define("CLEAROUT_PLUGIN_SETTINGS_API_URL", CLEAROUT_BASE_API_URL . "wordpress/co_wp_setting_changed?v=" . CLEAROUT_PLUGIN_VERSION);
    2020define("CLEAROUT_PLUGIN_DEACTIVATED_API_URL", CLEAROUT_BASE_API_URL . "wordpress/co_wp_deactivated?v=" . CLEAROUT_PLUGIN_VERSION);
  • clearout-email-validator/trunk/readme.txt

    r2707409 r2726689  
    271271= 1.7.12 =
    272272* Minor Fixes
     273= 2.0.0
     274* Major Fixes and Woocommerce form improvements
  • clearout-email-validator/trunk/src/clearout_validator.php

    r2707409 r2726689  
    5151}
    5252
     53function _get_current_page_url() {
     54    $page_url = '';
     55    try { //try to get full url if possible?
     56        $page_url = $_SERVER['HTTP_REFERER'];
     57    } catch (Exception $e) {
     58        $page_url = get_site_url();
     59    }
     60    return $page_url;
     61}
     62
    5363function _co_verify_email($emailAddress, $api_key, $timeout, $clearout_form_source, $use_cache)
    5464{
     
    6575    $data = NULL;
    6676    try {
     77        global $wp;
     78        // $page_url = add_query_arg( $wp->query_vars, home_url() );
     79        $page_url = _get_current_page_url();
     80
    6781        // Now we need to send the data to CLEAROUT API Token and return back the result.
    68         $url = CLEAROUT_EMAIL_VERIFY_API_URL . '&r=fs&fn=' . $clearout_form_source;
     82        $url = CLEAROUT_EMAIL_VERIFY_API_URL . '&r=fs&source=wordpress&fn=' . $clearout_form_source . '&pu=' . urlencode($page_url);
    6983        $args = array(
    7084            'method' => 'POST',
Note: See TracChangeset for help on using the changeset viewer.