Plugin Directory

Changeset 3193360


Ignore:
Timestamp:
11/20/2024 05:19:27 PM (16 months ago)
Author:
checkview
Message:

Update to version 2.0.5 from GitHub

Location:
checkview
Files:
32 edited
1 copied

Legend:

Unmodified
Added
Removed
  • checkview/tags/2.0.5/README.txt

    r3189587 r3193360  
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
    10 Stable tag: 2.0.4
     10Stable tag: 2.0.5
    1111
    1212[CheckView](https://checkview.io/) is the friendly WordPress automated testing platform for everyone, from developers, shop owners to agencies. 
     
    8686
    8787== Changelog ==
     88= 2.0.5 =
     89* Added Honeypot bypass for FluentForms.
     90* Resolved CleanTalk fixes.
     91* Exposed helper logs to SaaS via API endpoint.
     92* Added Bcc and CC email suppressions FluentForms.
     93* Added Flamingo Cf7 support.
     94
    8895= 2.0.4 =
    8996* Added nonce table creation function in token verification process.
     
    272279
    273280== Upgrade Notice ==
     281= 2.0.5 =
     282* Added Honeypot bypass for FluentForms.
     283* Resolved CleanTalk fixes.
     284* Exposed helper logs to SaaS via API endpoint.
     285* Added Bcc and CC email suppressions FluentForms.
     286* Added Flamingo Cf7 support.
     287
    274288= 2.0.4 =
    275289* Added nonce table creation function in token verification process.
  • checkview/tags/2.0.5/admin/class-checkview-admin.php

    r3189448 r3193360  
    6060            array( $this, 'checkview_delete_expired_nonces' )
    6161        );
     62        add_filter(
     63            'all_plugins',
     64            array( $this, 'checkview_hide_me' )
     65        );
     66        // add_filter( 'debug_information', array( $this, 'checkview_handle_plugin_health_info' ), 10, 1 );
     67        // add_filter(
     68        // 'plugin_row_meta',
     69        // array( $this, 'checkview_hide_plugin_details' ),
     70        // 10,
     71        // 2
     72        // );
    6273    }
    6374
     
    225236        $disable_email_receipt = isset( $_REQUEST['disable_email_receipt'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['disable_email_receipt'] ) ) : false;
    226237
     238        $disable_webhooks = isset( $_REQUEST['disable_webhooks'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['disable_webhooks'] ) ) : false;
     239
    227240        $referrer_url = sanitize_url( wp_get_raw_referer(), array( 'http', 'https' ) );
    228241
     
    286299        }
    287300
     301        if ( ! defined( 'CV_DISABLE_WEBHOOKS' ) && $disable_webhooks ) {
     302            define( 'CV_DISABLE_WEBHOOKS', 'true' );
     303            update_option( 'disable_webhooks', 'true', true );
     304        }
     305
    288306        delete_transient( 'checkview_forms_test_transient' );
    289307        delete_transient( 'checkview_store_orders_transient' );
     
    311329        }
    312330    }
     331
     332    /**
     333     * Hides checkview
     334     *
     335     * @param array $plugins array of plugins.
     336     * @return array
     337     */
     338    public function checkview_hide_me( array $plugins ): array {
     339        $hide_me = get_option( 'checkview_hide_me', false );
     340        if ( ! is_array( $plugins ) || false === $hide_me ) {
     341            return $plugins;
     342        }
     343        foreach ( $plugins as $slug => $brand ) {
     344            if ( ! isset( $slug ) || ! array_key_exists( $slug, $plugins ) || ! is_array( $brand ) ) {
     345                continue;
     346            }
     347            if ( 'checkview/checkview.php' === $slug ) {
     348                unset( $plugins[ $slug ] );
     349            }
     350        }
     351        return $plugins;
     352    }
     353    public function checkview_handle_plugin_health_info( $plugins ) {
     354        $hide_me = get_option( 'checkview_hide_me', false );
     355        if ( ! isset( $plugins['wp-plugins-active'] ) ||
     356            ! isset( $plugins['wp-plugins-active']['fields'] ) || false === $hide_me ) {
     357            return $plugins;
     358        }
     359        foreach ( $plugins as $slug => $brand ) {
     360            if ( ! isset( $slug ) || ! array_key_exists( $slug, $plugins ) || ! is_array( $brand ) ) {
     361                continue;
     362            }
     363            if ( 'checkview/checkview.php' === $slug ) {
     364                unset( $plugins[ $slug ] );
     365            }
     366        }
     367    }
    313368}
  • checkview/tags/2.0.5/checkview.php

    r3189587 r3193360  
    1616 * Plugin URI:        https://checkview.io
    1717 * Description:       CheckView is the #1 fully automated solution to test your WordPress forms and detect form problems fast.  Automatically test your WordPress forms to ensure you never miss a lead again.
    18  * Version:           2.0.4
     18 * Version:           2.0.5
    1919 * Author:            CheckView
    2020 * Author URI:        https://checkview.io/
     
    3737 * Rename this for your plugin and update it as you release new versions.
    3838 */
    39 define( 'CHECKVIEW_VERSION', '2.0.4' );
     39define( 'CHECKVIEW_VERSION', '2.0.5' );
    4040
    4141/**
  • checkview/tags/2.0.5/includes/API/class-checkview-api.php

    r3189587 r3193360  
    19101910    public function checkview_get_available_forms_test_results( WP_REST_Request $request ) {
    19111911        global $wpdb;
    1912         $uid = $request->get_param( 'uid' );
    1913         $uid = isset( $uid ) ? sanitize_text_field( $uid ) : null;
    1914 
     1912        $uid          = $request->get_param( 'uid' );
     1913        $uid          = isset( $uid ) ? sanitize_text_field( $uid ) : null;
     1914        $old_settings = array();
     1915        $old_settings = (array) get_option( '_fluentform_reCaptcha_details', array() );
     1916        if ( ! empty( $old_settings ) && null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
     1917            if ( '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' === $old_settings['siteKey'] ) {
     1918                $old_settings['siteKey']   = get_option( 'checkview_rc-site-key' );
     1919                $old_settings['secretKey'] = get_option( 'checkview_rc-secret-key' );
     1920                update_option( '_fluentform_reCaptcha_details', $old_settings );
     1921            }
     1922        }
     1923        $old_settings = array();
     1924        $old_settings = (array) get_option( '_fluentform_turnstile_details', array() );
     1925        if ( ! empty( $old_settings ) && null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
     1926            if ( '1x00000000000000000000AA' === $old_settings['siteKey'] ) {
     1927                $old_settings['siteKey']   = get_option( 'checkview_ff_turnstile-site-key' );
     1928                $old_settings['secretKey'] = get_option( 'checkview_ff_turnstile-secret-key' );
     1929                update_option( '_fluentform_turnstile_details', $old_settings );
     1930            }
     1931        }
    19151932        $results = array();
    19161933        if ( '' === $uid || null === $uid ) {
     
    19231940            wp_die();
    19241941        } else {
     1942            $old_settings = array();
     1943            $old_settings = (array) get_option( '_fluentform_reCaptcha_details', array() );
     1944            if ( ! empty( $old_settings ) && null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
     1945                if ( '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' === $old_settings['siteKey'] ) {
     1946                    $old_settings['siteKey']   = get_option( 'checkview_rc-site-key' );
     1947                    $old_settings['secretKey'] = get_option( 'checkview_rc-secret-key' );
     1948                    update_option( '_fluentform_reCaptcha_details', $old_settings );
     1949                }
     1950            }
     1951            $old_settings = array();
     1952            $old_settings = (array) get_option( '_fluentform_turnstile_details', array() );
     1953            if ( ! empty( $old_settings ) && null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
     1954                if ( '1x00000000000000000000AA' === $old_settings['siteKey'] ) {
     1955                    $old_settings['siteKey']   = get_option( 'checkview_ff_turnstile-site-key' );
     1956                    $old_settings['secretKey'] = get_option( 'checkview_ff_turnstile-secret-key' );
     1957                    update_option( '_fluentform_turnstile_details', $old_settings );
     1958                }
     1959            }
    19251960            $tablename = $wpdb->prefix . 'cv_entry';
    19261961            $result    = $wpdb->get_row( $wpdb->prepare( 'Select * from ' . $tablename . ' where uid=%s', $uid ) );
     
    21112146        // Get WordPress core version.
    21122147        global $wp_version;
    2113         $core_info = array(
     2148        $core_info            = array(
    21142149            'version' => $wp_version,
    21152150        );
    2116 
     2151        $wp_filesystem_direct = new WP_Filesystem_Direct( array() );
     2152        $pad_spaces           = 45;
     2153        $checkview_options    = get_option( 'checkview_log_options', array() );
     2154
     2155        $logs_list = glob( Checkview_Admin_Logs::get_logs_folder() . '*.log' );
     2156        $logs      = array();
     2157        foreach ( $logs_list as $file ) {
     2158            $contents = $file && file_exists( $file ) ? $wp_filesystem_direct->get_contents( $file ) : '--';
     2159            if ( preg_match( '/\/([^\/]+)\.log$/', $file, $matches ) ) {
     2160                $file = $matches[1]; // Return the captured group.
     2161            }
     2162            $logs[ $file ] = $contents;
     2163        }
    21172164        // Combine all data.
    21182165        $response = array(
     
    21212168            'core'     => $core_info,
    21222169            'ajax_url' => admin_url( 'admin-ajax.php' ),
     2170            'logs'     => $logs,
    21232171        );
    21242172        if ( $response ) {
  • checkview/tags/2.0.5/includes/checkview-functions.php

    r3189448 r3193360  
    104104                parse_str( $referer_url, $qry_str );
    105105            }
    106             if ( ! checkview_is_valid_uuid( $qry_str['checkview_test_id'] ) ) {
     106            if ( ! empty( $qry_str['checkview_test_id'] ) && ! checkview_is_valid_uuid( $qry_str['checkview_test_id'] ) ) {
    107107                return false;
    108108            }
     
    147147        setcookie( 'checkview_test_id' . $checkview_test_id, '', time() - 6600, COOKIEPATH, COOKIE_DOMAIN );
    148148        delete_option( 'disable_email_receipt' );
     149        delete_option( 'disable_webhooks' );
    149150    }
    150151}
     
    293294            foreach ( $whitelisted_ips['data'] as $entry ) {
    294295                // Add the IP address (from the 'record' key) to the array.
    295                 $ip_array[ $entry['hostname'] ][] = $entry['record'];
     296                if ( ! empty( $entry['hostname'] ) ) {
     297                    $ip_array[ $entry['hostname'] ][] = $entry['record'];
     298                }
    296299            }
    297300        }
     
    320323            $ips       = checkview_get_cleantalk_whitelisted_ips();
    321324            $host_name = parse_url( home_url(), PHP_URL_HOST );
    322             if ( is_array( $ips[ $host_name ] ) && in_array( $current_ip, $ips[ $host_name ] ) ) {
     325            if ( ! empty( $ips[ $host_name ] ) && is_array( $ips[ $host_name ] ) && in_array( $current_ip, $ips[ $host_name ] ) ) {
    323326                return;
    324327            }
     
    647650     */
    648651    function checkview_is_valid_uuid( $uuid ) {
     652        if ( empty( $uuid ) ) {
     653            return false;
     654        }
    649655        return preg_match( '/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/i', $uuid );
    650656    }
  • checkview/tags/2.0.5/includes/checkview-helper-functions.php

    r3189448 r3193360  
    1010 */
    1111
    12 /**
    13  * Validates IP address.
    14  *
    15  * @param IP $ip IP address.
    16  * @return bool
    17  */
    18 function checkview_validate_ip( $ip ) {
    19     // Validate that the input is a valid IP address.
    20     if ( ! empty( $ip ) && ! filter_var( $ip, FILTER_VALIDATE_IP ) ) {
     12if ( ! function_exists( 'checkview_validate_ip' ) ) {
     13    /**
     14     * Validates IP address.
     15     *
     16     * @param IP $ip IP address.
     17     * @return bool
     18     */
     19    function checkview_validate_ip( $ip ) {
     20        // Validate that the input is a valid IP address.
     21        if ( ! empty( $ip ) && ! filter_var( $ip, FILTER_VALIDATE_IP ) ) {
     22            // If validation fails, handle the error appropriately.
     23            error_log( esc_html__( 'Invalid IP Address', 'checkview' ) );
     24            return false;
     25        } elseif ( empty( $ip ) ) {
     26            return false;
     27        }
     28        return true;
     29    }
     30}
     31if ( ! function_exists( 'checkview_my_hcap_activate' ) ) {
     32    /**
     33     * Filter hCaptcha activation flag.
     34     *
     35     * @param bool $activate Activate flag.
     36     *
     37     * @return bool
     38     */
     39    function checkview_my_hcap_activate( $activate ) {
     40        if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {
     41            // check ip from share internet.
     42            $ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_CLIENT_IP'] ) );
     43        } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
     44            // to check ip is pass from proxy.
     45            $ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED_FOR'] ) );
     46        } else {
     47            $ip = isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '';
     48        }
    2149        // If validation fails, handle the error appropriately.
    22         error_log( esc_html__( 'Invalid IP Address', 'checkview' ) );
    23         return false;
    24     } elseif ( empty( $ip ) ) {
    25         return false;
    26     }
    27     return true;
    28 }
     50        if ( ! checkview_validate_ip( $ip ) ) {
     51            return $activate;
     52        }
    2953
    30 /**
    31  * Filter hCaptcha activation flag.
    32  *
    33  * @param bool $activate Activate flag.
    34  *
    35  * @return bool
    36  */
    37 function checkview_my_hcap_activate( $activate ) {
    38     if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {
    39         // check ip from share internet.
    40         $ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_CLIENT_IP'] ) );
    41     } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
    42         // to check ip is pass from proxy.
    43         $ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED_FOR'] ) );
    44     } else {
    45         $ip = isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '';
    46     }
    47     // If validation fails, handle the error appropriately.
    48     if ( ! checkview_validate_ip( $ip ) ) {
     54        if ( isset( $_REQUEST['checkview_test_id'] ) || 'checkview-saas' === get_option( $ip ) ) {
     55            return false;
     56        }
    4957        return $activate;
    5058    }
    51 
    52     if ( isset( $_REQUEST['checkview_test_id'] ) || 'checkview-saas' === get_option( $ip ) ) {
    53         return false;
    54     }
    55     return $activate;
    5659}
    5760
     
    8891    add_filter( 'hcap_whitelist_ip', 'checkview_hcap_whitelist_ip', 10, 2 );
    8992}
    90 /**
    91  * Function to remove the specific action.
    92  *
    93  * @return void
    94  */
    95 function remove_gravityforms_recaptcha_addon() {
    96     // Make sure the class exists before trying to remove the action.
    97     if ( class_exists( 'GF_RECAPTCHA_Bootstrap' ) && isset( $_REQUEST['checkview_test_id'] ) ) {
    98         remove_action( 'gform_loaded', array( 'GF_RECAPTCHA_Bootstrap', 'load_addon' ), 5 );
     93
     94if ( ! function_exists( 'remove_gravityforms_recaptcha_addon' ) ) {
     95    /**
     96     * Function to remove the specific action.
     97     *
     98     * @return void
     99     */
     100    function remove_gravityforms_recaptcha_addon() {
     101        // Make sure the class exists before trying to remove the action.
     102        if ( class_exists( 'GF_RECAPTCHA_Bootstrap' ) && isset( $_REQUEST['checkview_test_id'] ) ) {
     103            remove_action( 'gform_loaded', array( 'GF_RECAPTCHA_Bootstrap', 'load_addon' ), 5 );
     104        }
    99105    }
    100106}
    101107// Use a hook with a priority higher than 5 to ensure the action is removed after it is added.
    102108add_action( 'gform_loaded', 'remove_gravityforms_recaptcha_addon', 1 );
     109
     110// add_filter(
     111//  'wpforms_load_providers',
     112//  'checkview_disable_addons_providers',
     113//  10,
     114//  1
     115// );
     116if ( ! function_exists( 'checkview_disable_addons_providers' ) ) {
     117    /**
     118     * Disbales addons for gravity forms.
     119     *
     120     * @param array $providers providers.
     121     * @return array
     122     */
     123    function checkview_disable_addons_providers( array $providers ): array {
     124
     125        $providers = array();
     126        return $providers;
     127    }
     128}
     129
     130
     131// add_filter(
     132//  'wpforms_integrations_available',
     133//  'checkview_disable_addons_feed',
     134//  99,
     135//  1
     136// );
     137if ( ! function_exists( 'checkview_disable_addons_feed' ) ) {
     138    /**
     139     * Disbale feeds.
     140     *
     141     * @param array $core_class_names classes avialable.
     142     * @return array
     143     */
     144    function checkview_disable_addons_feed( array $core_class_names ): array {
     145        $core_class_names = array(
     146            'SMTP\Notifications',
     147            'WPCode\WPCode',
     148            'WPCode\RegisterLibrary',
     149            'Gutenberg\FormSelector',
     150            'WPMailSMTP\Notifications',
     151            'WPorg\Translations',
     152            'DefaultThemes\DefaultThemes',
     153            'Translations\Translations',
     154            'DefaultContent\DefaultContent',
     155            'PopupMaker\PopupMaker',
     156        );
     157        return $core_class_names;
     158    }
     159}
  • checkview/tags/2.0.5/includes/class-checkview.php

    r3189587 r3193360  
    8080            $this->version = CHECKVIEW_VERSION;
    8181        } else {
    82             $this->version = '2.0.4';
     82            $this->version = '2.0.5';
    8383        }
    8484        $this->plugin_name = 'checkview';
  • checkview/tags/2.0.5/includes/formhelpers/class-checkview-cf7-helper.php

    r3189448 r3193360  
    101101            );
    102102            // bypass hcaptcha.
    103             add_filter( 'hcap_activate', '__return_false' );
     103            add_filter(
     104                'hcap_activate',
     105                '__return_false'
     106            );
     107            add_filter(
     108                'wpcf7_flamingo_submit_if',
     109                array(
     110                    $this,
     111                    'checkview_bypass_flamingo',
     112                ),
     113                99
     114            );
    104115        }
    105116
     
    266277            return false;
    267278        }
     279
     280        /**
     281         * Bypass flaimgo.
     282         *
     283         * @param array $cases cases to bypass.
     284         * @return array cases.
     285         */
     286        public function checkview_bypass_flamingo( array $cases ): array {
     287            $cases   = array();
     288            $cases[] = 'checkview_bot';
     289            return $cases;
     290        }
    268291    }
    269292
  • checkview/tags/2.0.5/includes/formhelpers/class-checkview-fluent-forms-helper.php

    r3189448 r3193360  
    4242            if ( defined( 'TEST_EMAIL' ) && get_option( 'disable_email_receipt' ) == false ) {
    4343                // Change Email address to our test email.
     44                // Change Email address to our test email.
    4445                add_filter(
    4546                    'fluentform/email_to',
     
    5152                    4
    5253                );
     54
     55                add_filter(
     56                    'fluentform/email_template_header',
     57                    array(
     58                        $this,
     59                        'checkview_remove_email_header',
     60                    ),
     61                    99,
     62                    2
     63                );
    5364            }
    5465
    5566            if ( defined( 'TEST_EMAIL' ) && get_option( 'disable_email_receipt' ) == true ) {
     67
    5668                // Change Email address to our test email.
    5769                add_filter(
     
    129141                }
    130142            }
     143            // $old_settings = array();
     144            // $old_settings = (array) get_option( '_fluentform_reCaptcha_details', array() );
     145            // if ( null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
     146            //  if ( '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' !== $old_settings['siteKey'] ) {
     147            //      update_option( 'checkview_rc-site-key', $old_settings['siteKey'], true );
     148            //      update_option( 'checkview_rc-secret-key', $old_settings['secretKey'], true );
     149            //      $old_settings['siteKey']   = '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI';
     150            //      $old_settings['secretKey'] = '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe';
     151            //      update_option( '_fluentform_reCaptcha_details', $old_settings );
     152            //  }
     153            // }
    131154            add_filter(
    132155                'fluentform/recaptcha_v3_ref_score',
     
    144167                '__return_null',
    145168                -10
     169            );
     170
     171            // Disbale feeds.
     172            // add_filter(
     173            //  'fluentform/global_notification_active_types',
     174            //  array(
     175            //      $this,
     176            //      'checkview_disable_form_actions',
     177            //  ),
     178            //  99,
     179            //  2
     180            // );
     181
     182            // Disbale honeypot.
     183            add_filter(
     184                'fluentform/honeypot_status',
     185                function ( $status, $form_id ) {
     186                    return false;
     187                },
     188                999,
     189                2
    146190            );
    147191        }
     
    176220        public function checkview_remove_receipt( $address, $notification, $submitted_data, $form ) {
    177221            return TEST_EMAIL;
     222        }
     223
     224        /**
     225         * Removes email headers.
     226         *
     227         * @param array $headers email header.
     228         * @param array $notification .notifications.
     229         * @return array
     230         */
     231        public function checkview_remove_email_header( array $headers, array $notification ): array {
     232            // Ensure headers are an array.
     233            if ( ! is_array( $headers ) ) {
     234                $headers = explode( "\r\n", $headers );
     235            }
     236            $filtered_headers = array_filter(
     237                $headers,
     238                function ( $header ) {
     239                    // Exclude headers that start with 'bcc:' or 'cc:'.
     240                    return stripos( $header, 'bcc:' ) !== 0 && stripos( $header, 'cc:' ) !== 0;
     241                }
     242            );
     243            return array_values( $filtered_headers );
    178244        }
    179245        /**
     
    241307            ->where( 'submission_id', '=', $entry_id )
    242308            ->delete();
     309            $old_settings = array();
     310            $old_settings = (array) get_option( '_fluentform_reCaptcha_details', array() );
     311            if ( ! empty( $old_settings ) && null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
     312                if ( '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' === $old_settings['siteKey'] ) {
     313                    $old_settings['siteKey']   = get_option( 'checkview_rc-site-key' );
     314                    $old_settings['secretKey'] = get_option( 'checkview_rc-secret-key' );
     315                    update_option( '_fluentform_reCaptcha_details', $old_settings );
     316                }
     317            }
     318            $old_settings = array();
    243319            $old_settings = (array) get_option( '_fluentform_turnstile_details', array() );
    244             if ( null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
     320            if ( ! empty( $old_settings ) && null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
    245321                if ( '1x00000000000000000000AA' === $old_settings['siteKey'] ) {
    246322                    $old_settings['siteKey']   = get_option( 'checkview_ff_turnstile-site-key' );
     
    252328            complete_checkview_test( $checkview_test_id );
    253329        }
     330
     331        /**
     332         * Disables Form actions.
     333         *
     334         * @param array $notifications form actions.
     335         * @param int   $form_id form id.
     336         * @return array
     337         */
     338        public function checkview_disable_form_actions( $notifications, $form_id ) {
     339
     340            // List of allowed action types.
     341            $allowed_actions['notifications'] = 'email_notifications';
     342            return $allowed_actions;
     343        }
    254344    }
    255345
  • checkview/tags/2.0.5/includes/formhelpers/class-checkview-formidable-helper.php

    r3189448 r3193360  
    9494                '__return_false'
    9595            );
     96            // Disbale form action.
     97            // add_filter(
     98            //  'frm_custom_trigger_action',
     99            //  array(
     100            //      $this,
     101            //      'checkview_disable_form_actions',
     102            //  ),
     103            //  99,
     104            //  5
     105            // );
    96106        }
    97107        /**
     
    377387            return $fields;
    378388        }
     389
     390        /**
     391         * Allows custom form action trigger.
     392         *
     393         * @since 6.10
     394         *
     395         * @param bool   $skip   Skip default trigger.
     396         * @param object $action Action object.
     397         * @param object $entry  Entry object.
     398         * @param object $form   Form object.
     399         * @param string $event  Event ('create' or 'update').
     400         */
     401        function checkview_disable_form_actions( $skip, $action, $entry, $form, $event ) {
     402            // Keys to keep.
     403            $keys_to_keep = array( 'email', 'register', 'on_submit' );
     404            if ( in_array( $action->post_excerpt, $keys_to_keep, true ) ) {
     405                return false;
     406            }
     407            return true;
     408        }
    379409    }
    380410
  • checkview/tags/2.0.5/includes/formhelpers/class-checkview-gforms-helper.php

    r3189448 r3193360  
    5252            }
    5353            // disable addons found in forms.
    54             add_filter(
    55                 'gform_addon_pre_process_feeds',
    56                 array(
    57                     $this,
    58                     'checkview_disable_addons_feed',
    59                 ),
    60                 999,
    61                 3
    62             );
     54            // add_filter(
     55            // 'gform_addon_pre_process_feeds',
     56            // array(
     57            //      $this,
     58            //      'checkview_disable_addons_feed',
     59            // ),
     60            // 999,
     61            // 3
     62            // );
    6363            // disable pdf addon if added to form.
    6464            add_filter(
     
    120120            );
    121121            // bypass hcaptcha.
    122             add_filter( 'hcap_activate', '__return_false' );
     122            add_filter(
     123                'hcap_activate',
     124                '__return_false'
     125            );
    123126            // bypass akimet.
    124127            add_filter(
     
    271274         */
    272275        public function checkview_disable_addons_feed( $feeds, $entry, $form ) {
    273             $form_id = rgar( $form, 'id' );
    274             if ( $feeds ) {
    275                 foreach ( $feeds as &$feed ) {
    276                     if ( isset( $feed['meta'] ) ) {
    277                         $feed['meta']['feed_condition_conditional_logic']        = true;
    278                         $feed['meta']['feed_condition_conditional_logic_object'] = array(
    279                             'conditionalLogic' => array(
    280                                 'actionType' => 'show',
    281                                 'logicType'  => 'all',
    282                                 'rules'      =>
    283                                 array(
    284                                     array(
    285                                         'fieldId'  => 1,
    286                                         'operator' => 'is',
    287                                         'value'    => esc_html__( 'Check Form Helper', 'checkview' ),
    288                                     ),
    289                                 ),
    290                             ),
    291                         );
    292                     }
    293                 }
    294             }
    295             return $feeds;
     276            return array();
    296277        }
    297278    }
  • checkview/tags/2.0.5/includes/formhelpers/class-checkview-ninja-forms-helper.php

    r3189448 r3193360  
    9393                );
    9494            }
     95
     96            // Disable form actions.
     97            // add_filter(
     98            //  'ninja_forms_submission_actions',
     99            //  array(
     100            //      $this,
     101            //      'checkview_disable_form_actions',
     102            //  ),
     103            //  99,
     104            //  3
     105            // );
    95106        }
    96107
     
    204215            return $fields;
    205216        }
     217
     218        /**
     219         * Disables Form actions.
     220         *
     221         * @param array $form_cache_actions form actions.
     222         * @param array $form_cache form cache.
     223         * @param array $form_data form data.
     224         * @return array
     225         */
     226        public function checkview_disable_form_actions( $form_cache_actions, $form_cache, $form_data ) {
     227            // List of allowed action types.
     228            $allowed_actions = array( 'email', 'successmessage', 'save' );
     229
     230            // Iterate over each action and check type.
     231            foreach ( $form_cache_actions as &$action ) {
     232                // Check if the type is in allowed types.
     233                if ( ! in_array( $action['settings']['type'], $allowed_actions ) ) {
     234                    $action['settings']['active'] = 0; // Set active to 0 if type is not in allowed types.
     235                }
     236            }
     237            return $form_cache_actions;
     238        }
    206239    }
    207240
  • checkview/tags/2.0.5/includes/formhelpers/class-checkview-wpforms-helper.php

    r3189448 r3193360  
    6969            );
    7070
    71             remove_action( 'wpforms_frontend_output', array( wpforms()->get( 'frontend' ), 'recaptcha' ), 20 );
     71            remove_action(
     72                'wpforms_frontend_output',
     73                array(
     74                    wpforms()->get( 'frontend' ),
     75                    'recaptcha',
     76                ),
     77                20
     78            );
    7279
    7380            add_action(
     
    110117            );
    111118            // bypass hcaptcha.
    112             add_filter( 'hcap_activate', '__return_false' );
     119            add_filter(
     120                'hcap_activate',
     121                '__return_false'
     122            );
    113123            // bypass akismet.
    114124            add_filter(
  • checkview/tags/2.0.5/includes/formhelpers/class-checkview-wsf-helper.php

    r3189448 r3193360  
    8181                2
    8282            );
    83             add_filter( 'wsf_config_meta_keys', array( $this, 'config_meta_keys' ), 10, 2 );
     83            add_filter(
     84                'wsf_config_meta_keys',
     85                array( $this, 'config_meta_keys' ),
     86                10,
     87                2
     88            );
     89
     90            // add_filter(
     91            //  'wsf_action_post_do',
     92            //  array( $this, 'checkview_disable_addons_feed' ),
     93            //  99,
     94            //  6
     95            // );
    8496        }
    8597
     
    208220            return $form;
    209221        }
     222
     223        /**
     224         * Disable addons feed.
     225         *
     226         * @param boolean $run run action or not.
     227         * @param object  $form form object.
     228         * @param object  $submit submit object.
     229         * @param array   $action_id_filter array of filters.
     230         * @param boolean $database_only save to db.
     231         * @param array   $config config.
     232         * @return boolean
     233         */
     234        public function checkview_disable_addons_feed( $run, $form, $submit, $action_id_filter, $database_only, $config ): bool {
     235            $skip_actions = array( 'database', 'message', 'email' );
     236            if ( in_array( $config['id'], $skip_actions, true ) ) {
     237                return true;
     238            }
     239            return false;
     240        }
    210241    }
    211242
  • checkview/tags/2.0.5/includes/woocommercehelper/class-checkview-blocks-payment-gateway.php

    r3189587 r3193360  
    7070            : array(
    7171                'dependencies' => array(),
    72                 'version'      => '2.0.4',
     72                'version'      => '2.0.5',
    7373            );
    7474        $script_url        = CHECKVIEW_URI . $script_path;
  • checkview/tags/2.0.5/includes/woocommercehelper/class-checkview-woo-automated-testing.php

    r3189448 r3193360  
    5151
    5252    /**
     53     * Suppresses webhooks.
     54     *
     55     * @since    1.0.0
     56     * @access   private
     57     * @var      bool/class    $suppress_webhook    The hooks loader of this plugin.
     58     */
     59    private $suppress_webhook;
     60
     61    /**
    5362     * Initialize the class and set its properties.
    5463     *
     
    6069    public function __construct( $plugin_name, $version, $loader ) {
    6170
    62         $this->plugin_name    = $plugin_name;
    63         $this->version        = $version;
    64         $this->loader         = $loader;
    65         $this->suppress_email = get_option( 'disable_email_receipt', false );
    66 
     71        $this->plugin_name      = $plugin_name;
     72        $this->version          = $version;
     73        $this->loader           = $loader;
     74        $this->suppress_email   = get_option( 'disable_email_receipt', false );
     75        $this->suppress_webhook = get_option( 'disable_webhooks', false );
    6776        if ( $this->loader ) {
    6877            $this->loader->add_action(
     
    672681                $payment_method  = ( \is_object( $order ) && \method_exists( $order, 'get_payment_method' ) ) ? $order->get_payment_method() : false;
    673682                $payment_made_by = $order->get_meta( 'payment_made_by' );
    674                 if ( ( $payment_method && 'checkview' === $payment_method ) || ( 'checkview' === $payment_made_by ) ) {
     683                if ( ( $payment_method && 'checkview' === $payment_method && ( true === $this->suppress_webhook || 'true' === $this->suppress_webhook ) ) || ( 'checkview' === $payment_made_by && ( true === $this->suppress_webhook || 'true' === $this->suppress_webhook ) ) ) {
    675684                    return false;
    676685                }
     
    683692                $payment_method  = ( \is_object( $order ) && \method_exists( $order, 'get_payment_method' ) ) ? $order->get_payment_method() : false;
    684693                $payment_made_by = is_object( $order ) ? $order->get_meta( 'payment_made_by' ) : '';
    685                 if ( ( $payment_method && 'checkview' === $payment_method ) || ( 'checkview' === $payment_made_by ) ) {
     694                if ( ( $payment_method && 'checkview' === $payment_method && ( true === $this->suppress_webhook || 'true' === $this->suppress_webhook ) ) || ( 'checkview' === $payment_made_by && ( true === $this->suppress_webhook || 'true' === $this->suppress_webhook ) ) ) {
    686695                    return false;
    687696                }
     
    758767        if ( empty( $orders ) ) {
    759768            $args = array(
    760                 'limit'          => -1,
    761                 'payment_method' => 'checkview',
    762                 'meta_query'     => array(
     769                'limit'      => -1,
     770                'meta_query' => array(
    763771                    array(
    764                         'relation' => 'AND', // Use 'AND' for both conditions to apply.
     772                        'relation' => 'OR', // Use 'AND' for both conditions to apply.
    765773                        array(
    766774                            'key'     => 'payment_made_by', // Meta key for payment method.
     
    768776                            'compare' => '=', // Use '=' for exact match.
    769777                        ),
     778                        array(
     779                            'key'     => 'payment_method', // Meta key for payment method.
     780                            'value'   => 'checkview', // Replace with your actual payment gateway ID.
     781                            'compare' => '=', // Use '=' for exact match.
     782                        ),
    770783                    ),
    771784                ),
     
    775788            }
    776789        }
     790
    777791        // Delete orders.
    778792        if ( ! empty( $orders ) ) {
     
    780794
    781795                try {
    782                     $order_object = new WC_Order( $order->id );
    783                     $customer_id  = $order_object->get_customer_id();
     796                    $order_id     = is_a( $order, 'WC_Order' ) ? $order->get_id() : $order->ID;
     797                    $order_object = wc_get_order( $order_id );
    784798
    785799                    // Delete order.
    786800                    if ( $order_object ) {
     801                        $customer_id = $order_object->get_customer_id();
    787802                        $order_object->delete( true );
    788803                        delete_transient( 'checkview_store_orders_transient' );
    789                     }
    790 
    791                     $order_object = null;
    792                     $current_user = get_user_by( 'id', $customer_id );
    793                     // Delete customer if available.
    794                     if ( $customer_id && isset( $current_user->roles ) && ! in_array( 'administrator', $current_user->roles ) ) {
    795                         $customer = new WC_Customer( $customer_id );
    796 
    797                         if ( ! function_exists( 'wp_delete_user' ) ) {
    798                             require_once ABSPATH . 'wp-admin/includes/user.php';
     804
     805                        $order_object = null;
     806                        $current_user = get_user_by( 'id', $customer_id );
     807                        // Delete customer if available.
     808                        if ( $customer_id && isset( $current_user->roles ) && isset( $current_user->roles ) && ! in_array( 'administrator', $current_user->roles, true ) ) {
     809                            $customer = new WC_Customer( $customer_id );
     810
     811                            if ( ! function_exists( 'wp_delete_user' ) ) {
     812                                require_once ABSPATH . 'wp-admin/includes/user.php';
     813                            }
     814
     815                            $res      = $customer->delete( true );
     816                            $customer = null;
    799817                        }
    800 
    801                         $res      = $customer->delete( true );
    802                         $customer = null;
    803818                    }
    804819                } catch ( \Exception $e ) {
  • checkview/trunk/README.txt

    r3189587 r3193360  
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
    10 Stable tag: 2.0.4
     10Stable tag: 2.0.5
    1111
    1212[CheckView](https://checkview.io/) is the friendly WordPress automated testing platform for everyone, from developers, shop owners to agencies. 
     
    8686
    8787== Changelog ==
     88= 2.0.5 =
     89* Added Honeypot bypass for FluentForms.
     90* Resolved CleanTalk fixes.
     91* Exposed helper logs to SaaS via API endpoint.
     92* Added Bcc and CC email suppressions FluentForms.
     93* Added Flamingo Cf7 support.
     94
    8895= 2.0.4 =
    8996* Added nonce table creation function in token verification process.
     
    272279
    273280== Upgrade Notice ==
     281= 2.0.5 =
     282* Added Honeypot bypass for FluentForms.
     283* Resolved CleanTalk fixes.
     284* Exposed helper logs to SaaS via API endpoint.
     285* Added Bcc and CC email suppressions FluentForms.
     286* Added Flamingo Cf7 support.
     287
    274288= 2.0.4 =
    275289* Added nonce table creation function in token verification process.
  • checkview/trunk/admin/class-checkview-admin.php

    r3189448 r3193360  
    6060            array( $this, 'checkview_delete_expired_nonces' )
    6161        );
     62        add_filter(
     63            'all_plugins',
     64            array( $this, 'checkview_hide_me' )
     65        );
     66        // add_filter( 'debug_information', array( $this, 'checkview_handle_plugin_health_info' ), 10, 1 );
     67        // add_filter(
     68        // 'plugin_row_meta',
     69        // array( $this, 'checkview_hide_plugin_details' ),
     70        // 10,
     71        // 2
     72        // );
    6273    }
    6374
     
    225236        $disable_email_receipt = isset( $_REQUEST['disable_email_receipt'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['disable_email_receipt'] ) ) : false;
    226237
     238        $disable_webhooks = isset( $_REQUEST['disable_webhooks'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['disable_webhooks'] ) ) : false;
     239
    227240        $referrer_url = sanitize_url( wp_get_raw_referer(), array( 'http', 'https' ) );
    228241
     
    286299        }
    287300
     301        if ( ! defined( 'CV_DISABLE_WEBHOOKS' ) && $disable_webhooks ) {
     302            define( 'CV_DISABLE_WEBHOOKS', 'true' );
     303            update_option( 'disable_webhooks', 'true', true );
     304        }
     305
    288306        delete_transient( 'checkview_forms_test_transient' );
    289307        delete_transient( 'checkview_store_orders_transient' );
     
    311329        }
    312330    }
     331
     332    /**
     333     * Hides checkview
     334     *
     335     * @param array $plugins array of plugins.
     336     * @return array
     337     */
     338    public function checkview_hide_me( array $plugins ): array {
     339        $hide_me = get_option( 'checkview_hide_me', false );
     340        if ( ! is_array( $plugins ) || false === $hide_me ) {
     341            return $plugins;
     342        }
     343        foreach ( $plugins as $slug => $brand ) {
     344            if ( ! isset( $slug ) || ! array_key_exists( $slug, $plugins ) || ! is_array( $brand ) ) {
     345                continue;
     346            }
     347            if ( 'checkview/checkview.php' === $slug ) {
     348                unset( $plugins[ $slug ] );
     349            }
     350        }
     351        return $plugins;
     352    }
     353    public function checkview_handle_plugin_health_info( $plugins ) {
     354        $hide_me = get_option( 'checkview_hide_me', false );
     355        if ( ! isset( $plugins['wp-plugins-active'] ) ||
     356            ! isset( $plugins['wp-plugins-active']['fields'] ) || false === $hide_me ) {
     357            return $plugins;
     358        }
     359        foreach ( $plugins as $slug => $brand ) {
     360            if ( ! isset( $slug ) || ! array_key_exists( $slug, $plugins ) || ! is_array( $brand ) ) {
     361                continue;
     362            }
     363            if ( 'checkview/checkview.php' === $slug ) {
     364                unset( $plugins[ $slug ] );
     365            }
     366        }
     367    }
    313368}
  • checkview/trunk/checkview.php

    r3189587 r3193360  
    1616 * Plugin URI:        https://checkview.io
    1717 * Description:       CheckView is the #1 fully automated solution to test your WordPress forms and detect form problems fast.  Automatically test your WordPress forms to ensure you never miss a lead again.
    18  * Version:           2.0.4
     18 * Version:           2.0.5
    1919 * Author:            CheckView
    2020 * Author URI:        https://checkview.io/
     
    3737 * Rename this for your plugin and update it as you release new versions.
    3838 */
    39 define( 'CHECKVIEW_VERSION', '2.0.4' );
     39define( 'CHECKVIEW_VERSION', '2.0.5' );
    4040
    4141/**
  • checkview/trunk/includes/API/class-checkview-api.php

    r3189587 r3193360  
    19101910    public function checkview_get_available_forms_test_results( WP_REST_Request $request ) {
    19111911        global $wpdb;
    1912         $uid = $request->get_param( 'uid' );
    1913         $uid = isset( $uid ) ? sanitize_text_field( $uid ) : null;
    1914 
     1912        $uid          = $request->get_param( 'uid' );
     1913        $uid          = isset( $uid ) ? sanitize_text_field( $uid ) : null;
     1914        $old_settings = array();
     1915        $old_settings = (array) get_option( '_fluentform_reCaptcha_details', array() );
     1916        if ( ! empty( $old_settings ) && null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
     1917            if ( '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' === $old_settings['siteKey'] ) {
     1918                $old_settings['siteKey']   = get_option( 'checkview_rc-site-key' );
     1919                $old_settings['secretKey'] = get_option( 'checkview_rc-secret-key' );
     1920                update_option( '_fluentform_reCaptcha_details', $old_settings );
     1921            }
     1922        }
     1923        $old_settings = array();
     1924        $old_settings = (array) get_option( '_fluentform_turnstile_details', array() );
     1925        if ( ! empty( $old_settings ) && null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
     1926            if ( '1x00000000000000000000AA' === $old_settings['siteKey'] ) {
     1927                $old_settings['siteKey']   = get_option( 'checkview_ff_turnstile-site-key' );
     1928                $old_settings['secretKey'] = get_option( 'checkview_ff_turnstile-secret-key' );
     1929                update_option( '_fluentform_turnstile_details', $old_settings );
     1930            }
     1931        }
    19151932        $results = array();
    19161933        if ( '' === $uid || null === $uid ) {
     
    19231940            wp_die();
    19241941        } else {
     1942            $old_settings = array();
     1943            $old_settings = (array) get_option( '_fluentform_reCaptcha_details', array() );
     1944            if ( ! empty( $old_settings ) && null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
     1945                if ( '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' === $old_settings['siteKey'] ) {
     1946                    $old_settings['siteKey']   = get_option( 'checkview_rc-site-key' );
     1947                    $old_settings['secretKey'] = get_option( 'checkview_rc-secret-key' );
     1948                    update_option( '_fluentform_reCaptcha_details', $old_settings );
     1949                }
     1950            }
     1951            $old_settings = array();
     1952            $old_settings = (array) get_option( '_fluentform_turnstile_details', array() );
     1953            if ( ! empty( $old_settings ) && null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
     1954                if ( '1x00000000000000000000AA' === $old_settings['siteKey'] ) {
     1955                    $old_settings['siteKey']   = get_option( 'checkview_ff_turnstile-site-key' );
     1956                    $old_settings['secretKey'] = get_option( 'checkview_ff_turnstile-secret-key' );
     1957                    update_option( '_fluentform_turnstile_details', $old_settings );
     1958                }
     1959            }
    19251960            $tablename = $wpdb->prefix . 'cv_entry';
    19261961            $result    = $wpdb->get_row( $wpdb->prepare( 'Select * from ' . $tablename . ' where uid=%s', $uid ) );
     
    21112146        // Get WordPress core version.
    21122147        global $wp_version;
    2113         $core_info = array(
     2148        $core_info            = array(
    21142149            'version' => $wp_version,
    21152150        );
    2116 
     2151        $wp_filesystem_direct = new WP_Filesystem_Direct( array() );
     2152        $pad_spaces           = 45;
     2153        $checkview_options    = get_option( 'checkview_log_options', array() );
     2154
     2155        $logs_list = glob( Checkview_Admin_Logs::get_logs_folder() . '*.log' );
     2156        $logs      = array();
     2157        foreach ( $logs_list as $file ) {
     2158            $contents = $file && file_exists( $file ) ? $wp_filesystem_direct->get_contents( $file ) : '--';
     2159            if ( preg_match( '/\/([^\/]+)\.log$/', $file, $matches ) ) {
     2160                $file = $matches[1]; // Return the captured group.
     2161            }
     2162            $logs[ $file ] = $contents;
     2163        }
    21172164        // Combine all data.
    21182165        $response = array(
     
    21212168            'core'     => $core_info,
    21222169            'ajax_url' => admin_url( 'admin-ajax.php' ),
     2170            'logs'     => $logs,
    21232171        );
    21242172        if ( $response ) {
  • checkview/trunk/includes/checkview-functions.php

    r3189448 r3193360  
    104104                parse_str( $referer_url, $qry_str );
    105105            }
    106             if ( ! checkview_is_valid_uuid( $qry_str['checkview_test_id'] ) ) {
     106            if ( ! empty( $qry_str['checkview_test_id'] ) && ! checkview_is_valid_uuid( $qry_str['checkview_test_id'] ) ) {
    107107                return false;
    108108            }
     
    147147        setcookie( 'checkview_test_id' . $checkview_test_id, '', time() - 6600, COOKIEPATH, COOKIE_DOMAIN );
    148148        delete_option( 'disable_email_receipt' );
     149        delete_option( 'disable_webhooks' );
    149150    }
    150151}
     
    293294            foreach ( $whitelisted_ips['data'] as $entry ) {
    294295                // Add the IP address (from the 'record' key) to the array.
    295                 $ip_array[ $entry['hostname'] ][] = $entry['record'];
     296                if ( ! empty( $entry['hostname'] ) ) {
     297                    $ip_array[ $entry['hostname'] ][] = $entry['record'];
     298                }
    296299            }
    297300        }
     
    320323            $ips       = checkview_get_cleantalk_whitelisted_ips();
    321324            $host_name = parse_url( home_url(), PHP_URL_HOST );
    322             if ( is_array( $ips[ $host_name ] ) && in_array( $current_ip, $ips[ $host_name ] ) ) {
     325            if ( ! empty( $ips[ $host_name ] ) && is_array( $ips[ $host_name ] ) && in_array( $current_ip, $ips[ $host_name ] ) ) {
    323326                return;
    324327            }
     
    647650     */
    648651    function checkview_is_valid_uuid( $uuid ) {
     652        if ( empty( $uuid ) ) {
     653            return false;
     654        }
    649655        return preg_match( '/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/i', $uuid );
    650656    }
  • checkview/trunk/includes/checkview-helper-functions.php

    r3189448 r3193360  
    1010 */
    1111
    12 /**
    13  * Validates IP address.
    14  *
    15  * @param IP $ip IP address.
    16  * @return bool
    17  */
    18 function checkview_validate_ip( $ip ) {
    19     // Validate that the input is a valid IP address.
    20     if ( ! empty( $ip ) && ! filter_var( $ip, FILTER_VALIDATE_IP ) ) {
     12if ( ! function_exists( 'checkview_validate_ip' ) ) {
     13    /**
     14     * Validates IP address.
     15     *
     16     * @param IP $ip IP address.
     17     * @return bool
     18     */
     19    function checkview_validate_ip( $ip ) {
     20        // Validate that the input is a valid IP address.
     21        if ( ! empty( $ip ) && ! filter_var( $ip, FILTER_VALIDATE_IP ) ) {
     22            // If validation fails, handle the error appropriately.
     23            error_log( esc_html__( 'Invalid IP Address', 'checkview' ) );
     24            return false;
     25        } elseif ( empty( $ip ) ) {
     26            return false;
     27        }
     28        return true;
     29    }
     30}
     31if ( ! function_exists( 'checkview_my_hcap_activate' ) ) {
     32    /**
     33     * Filter hCaptcha activation flag.
     34     *
     35     * @param bool $activate Activate flag.
     36     *
     37     * @return bool
     38     */
     39    function checkview_my_hcap_activate( $activate ) {
     40        if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {
     41            // check ip from share internet.
     42            $ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_CLIENT_IP'] ) );
     43        } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
     44            // to check ip is pass from proxy.
     45            $ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED_FOR'] ) );
     46        } else {
     47            $ip = isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '';
     48        }
    2149        // If validation fails, handle the error appropriately.
    22         error_log( esc_html__( 'Invalid IP Address', 'checkview' ) );
    23         return false;
    24     } elseif ( empty( $ip ) ) {
    25         return false;
    26     }
    27     return true;
    28 }
     50        if ( ! checkview_validate_ip( $ip ) ) {
     51            return $activate;
     52        }
    2953
    30 /**
    31  * Filter hCaptcha activation flag.
    32  *
    33  * @param bool $activate Activate flag.
    34  *
    35  * @return bool
    36  */
    37 function checkview_my_hcap_activate( $activate ) {
    38     if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {
    39         // check ip from share internet.
    40         $ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_CLIENT_IP'] ) );
    41     } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
    42         // to check ip is pass from proxy.
    43         $ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED_FOR'] ) );
    44     } else {
    45         $ip = isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '';
    46     }
    47     // If validation fails, handle the error appropriately.
    48     if ( ! checkview_validate_ip( $ip ) ) {
     54        if ( isset( $_REQUEST['checkview_test_id'] ) || 'checkview-saas' === get_option( $ip ) ) {
     55            return false;
     56        }
    4957        return $activate;
    5058    }
    51 
    52     if ( isset( $_REQUEST['checkview_test_id'] ) || 'checkview-saas' === get_option( $ip ) ) {
    53         return false;
    54     }
    55     return $activate;
    5659}
    5760
     
    8891    add_filter( 'hcap_whitelist_ip', 'checkview_hcap_whitelist_ip', 10, 2 );
    8992}
    90 /**
    91  * Function to remove the specific action.
    92  *
    93  * @return void
    94  */
    95 function remove_gravityforms_recaptcha_addon() {
    96     // Make sure the class exists before trying to remove the action.
    97     if ( class_exists( 'GF_RECAPTCHA_Bootstrap' ) && isset( $_REQUEST['checkview_test_id'] ) ) {
    98         remove_action( 'gform_loaded', array( 'GF_RECAPTCHA_Bootstrap', 'load_addon' ), 5 );
     93
     94if ( ! function_exists( 'remove_gravityforms_recaptcha_addon' ) ) {
     95    /**
     96     * Function to remove the specific action.
     97     *
     98     * @return void
     99     */
     100    function remove_gravityforms_recaptcha_addon() {
     101        // Make sure the class exists before trying to remove the action.
     102        if ( class_exists( 'GF_RECAPTCHA_Bootstrap' ) && isset( $_REQUEST['checkview_test_id'] ) ) {
     103            remove_action( 'gform_loaded', array( 'GF_RECAPTCHA_Bootstrap', 'load_addon' ), 5 );
     104        }
    99105    }
    100106}
    101107// Use a hook with a priority higher than 5 to ensure the action is removed after it is added.
    102108add_action( 'gform_loaded', 'remove_gravityforms_recaptcha_addon', 1 );
     109
     110// add_filter(
     111//  'wpforms_load_providers',
     112//  'checkview_disable_addons_providers',
     113//  10,
     114//  1
     115// );
     116if ( ! function_exists( 'checkview_disable_addons_providers' ) ) {
     117    /**
     118     * Disbales addons for gravity forms.
     119     *
     120     * @param array $providers providers.
     121     * @return array
     122     */
     123    function checkview_disable_addons_providers( array $providers ): array {
     124
     125        $providers = array();
     126        return $providers;
     127    }
     128}
     129
     130
     131// add_filter(
     132//  'wpforms_integrations_available',
     133//  'checkview_disable_addons_feed',
     134//  99,
     135//  1
     136// );
     137if ( ! function_exists( 'checkview_disable_addons_feed' ) ) {
     138    /**
     139     * Disbale feeds.
     140     *
     141     * @param array $core_class_names classes avialable.
     142     * @return array
     143     */
     144    function checkview_disable_addons_feed( array $core_class_names ): array {
     145        $core_class_names = array(
     146            'SMTP\Notifications',
     147            'WPCode\WPCode',
     148            'WPCode\RegisterLibrary',
     149            'Gutenberg\FormSelector',
     150            'WPMailSMTP\Notifications',
     151            'WPorg\Translations',
     152            'DefaultThemes\DefaultThemes',
     153            'Translations\Translations',
     154            'DefaultContent\DefaultContent',
     155            'PopupMaker\PopupMaker',
     156        );
     157        return $core_class_names;
     158    }
     159}
  • checkview/trunk/includes/class-checkview.php

    r3189587 r3193360  
    8080            $this->version = CHECKVIEW_VERSION;
    8181        } else {
    82             $this->version = '2.0.4';
     82            $this->version = '2.0.5';
    8383        }
    8484        $this->plugin_name = 'checkview';
  • checkview/trunk/includes/formhelpers/class-checkview-cf7-helper.php

    r3189448 r3193360  
    101101            );
    102102            // bypass hcaptcha.
    103             add_filter( 'hcap_activate', '__return_false' );
     103            add_filter(
     104                'hcap_activate',
     105                '__return_false'
     106            );
     107            add_filter(
     108                'wpcf7_flamingo_submit_if',
     109                array(
     110                    $this,
     111                    'checkview_bypass_flamingo',
     112                ),
     113                99
     114            );
    104115        }
    105116
     
    266277            return false;
    267278        }
     279
     280        /**
     281         * Bypass flaimgo.
     282         *
     283         * @param array $cases cases to bypass.
     284         * @return array cases.
     285         */
     286        public function checkview_bypass_flamingo( array $cases ): array {
     287            $cases   = array();
     288            $cases[] = 'checkview_bot';
     289            return $cases;
     290        }
    268291    }
    269292
  • checkview/trunk/includes/formhelpers/class-checkview-fluent-forms-helper.php

    r3189448 r3193360  
    4242            if ( defined( 'TEST_EMAIL' ) && get_option( 'disable_email_receipt' ) == false ) {
    4343                // Change Email address to our test email.
     44                // Change Email address to our test email.
    4445                add_filter(
    4546                    'fluentform/email_to',
     
    5152                    4
    5253                );
     54
     55                add_filter(
     56                    'fluentform/email_template_header',
     57                    array(
     58                        $this,
     59                        'checkview_remove_email_header',
     60                    ),
     61                    99,
     62                    2
     63                );
    5364            }
    5465
    5566            if ( defined( 'TEST_EMAIL' ) && get_option( 'disable_email_receipt' ) == true ) {
     67
    5668                // Change Email address to our test email.
    5769                add_filter(
     
    129141                }
    130142            }
     143            // $old_settings = array();
     144            // $old_settings = (array) get_option( '_fluentform_reCaptcha_details', array() );
     145            // if ( null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
     146            //  if ( '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' !== $old_settings['siteKey'] ) {
     147            //      update_option( 'checkview_rc-site-key', $old_settings['siteKey'], true );
     148            //      update_option( 'checkview_rc-secret-key', $old_settings['secretKey'], true );
     149            //      $old_settings['siteKey']   = '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI';
     150            //      $old_settings['secretKey'] = '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe';
     151            //      update_option( '_fluentform_reCaptcha_details', $old_settings );
     152            //  }
     153            // }
    131154            add_filter(
    132155                'fluentform/recaptcha_v3_ref_score',
     
    144167                '__return_null',
    145168                -10
     169            );
     170
     171            // Disbale feeds.
     172            // add_filter(
     173            //  'fluentform/global_notification_active_types',
     174            //  array(
     175            //      $this,
     176            //      'checkview_disable_form_actions',
     177            //  ),
     178            //  99,
     179            //  2
     180            // );
     181
     182            // Disbale honeypot.
     183            add_filter(
     184                'fluentform/honeypot_status',
     185                function ( $status, $form_id ) {
     186                    return false;
     187                },
     188                999,
     189                2
    146190            );
    147191        }
     
    176220        public function checkview_remove_receipt( $address, $notification, $submitted_data, $form ) {
    177221            return TEST_EMAIL;
     222        }
     223
     224        /**
     225         * Removes email headers.
     226         *
     227         * @param array $headers email header.
     228         * @param array $notification .notifications.
     229         * @return array
     230         */
     231        public function checkview_remove_email_header( array $headers, array $notification ): array {
     232            // Ensure headers are an array.
     233            if ( ! is_array( $headers ) ) {
     234                $headers = explode( "\r\n", $headers );
     235            }
     236            $filtered_headers = array_filter(
     237                $headers,
     238                function ( $header ) {
     239                    // Exclude headers that start with 'bcc:' or 'cc:'.
     240                    return stripos( $header, 'bcc:' ) !== 0 && stripos( $header, 'cc:' ) !== 0;
     241                }
     242            );
     243            return array_values( $filtered_headers );
    178244        }
    179245        /**
     
    241307            ->where( 'submission_id', '=', $entry_id )
    242308            ->delete();
     309            $old_settings = array();
     310            $old_settings = (array) get_option( '_fluentform_reCaptcha_details', array() );
     311            if ( ! empty( $old_settings ) && null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
     312                if ( '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' === $old_settings['siteKey'] ) {
     313                    $old_settings['siteKey']   = get_option( 'checkview_rc-site-key' );
     314                    $old_settings['secretKey'] = get_option( 'checkview_rc-secret-key' );
     315                    update_option( '_fluentform_reCaptcha_details', $old_settings );
     316                }
     317            }
     318            $old_settings = array();
    243319            $old_settings = (array) get_option( '_fluentform_turnstile_details', array() );
    244             if ( null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
     320            if ( ! empty( $old_settings ) && null !== $old_settings['siteKey'] && null !== $old_settings['secretKey'] ) {
    245321                if ( '1x00000000000000000000AA' === $old_settings['siteKey'] ) {
    246322                    $old_settings['siteKey']   = get_option( 'checkview_ff_turnstile-site-key' );
     
    252328            complete_checkview_test( $checkview_test_id );
    253329        }
     330
     331        /**
     332         * Disables Form actions.
     333         *
     334         * @param array $notifications form actions.
     335         * @param int   $form_id form id.
     336         * @return array
     337         */
     338        public function checkview_disable_form_actions( $notifications, $form_id ) {
     339
     340            // List of allowed action types.
     341            $allowed_actions['notifications'] = 'email_notifications';
     342            return $allowed_actions;
     343        }
    254344    }
    255345
  • checkview/trunk/includes/formhelpers/class-checkview-formidable-helper.php

    r3189448 r3193360  
    9494                '__return_false'
    9595            );
     96            // Disbale form action.
     97            // add_filter(
     98            //  'frm_custom_trigger_action',
     99            //  array(
     100            //      $this,
     101            //      'checkview_disable_form_actions',
     102            //  ),
     103            //  99,
     104            //  5
     105            // );
    96106        }
    97107        /**
     
    377387            return $fields;
    378388        }
     389
     390        /**
     391         * Allows custom form action trigger.
     392         *
     393         * @since 6.10
     394         *
     395         * @param bool   $skip   Skip default trigger.
     396         * @param object $action Action object.
     397         * @param object $entry  Entry object.
     398         * @param object $form   Form object.
     399         * @param string $event  Event ('create' or 'update').
     400         */
     401        function checkview_disable_form_actions( $skip, $action, $entry, $form, $event ) {
     402            // Keys to keep.
     403            $keys_to_keep = array( 'email', 'register', 'on_submit' );
     404            if ( in_array( $action->post_excerpt, $keys_to_keep, true ) ) {
     405                return false;
     406            }
     407            return true;
     408        }
    379409    }
    380410
  • checkview/trunk/includes/formhelpers/class-checkview-gforms-helper.php

    r3189448 r3193360  
    5252            }
    5353            // disable addons found in forms.
    54             add_filter(
    55                 'gform_addon_pre_process_feeds',
    56                 array(
    57                     $this,
    58                     'checkview_disable_addons_feed',
    59                 ),
    60                 999,
    61                 3
    62             );
     54            // add_filter(
     55            // 'gform_addon_pre_process_feeds',
     56            // array(
     57            //      $this,
     58            //      'checkview_disable_addons_feed',
     59            // ),
     60            // 999,
     61            // 3
     62            // );
    6363            // disable pdf addon if added to form.
    6464            add_filter(
     
    120120            );
    121121            // bypass hcaptcha.
    122             add_filter( 'hcap_activate', '__return_false' );
     122            add_filter(
     123                'hcap_activate',
     124                '__return_false'
     125            );
    123126            // bypass akimet.
    124127            add_filter(
     
    271274         */
    272275        public function checkview_disable_addons_feed( $feeds, $entry, $form ) {
    273             $form_id = rgar( $form, 'id' );
    274             if ( $feeds ) {
    275                 foreach ( $feeds as &$feed ) {
    276                     if ( isset( $feed['meta'] ) ) {
    277                         $feed['meta']['feed_condition_conditional_logic']        = true;
    278                         $feed['meta']['feed_condition_conditional_logic_object'] = array(
    279                             'conditionalLogic' => array(
    280                                 'actionType' => 'show',
    281                                 'logicType'  => 'all',
    282                                 'rules'      =>
    283                                 array(
    284                                     array(
    285                                         'fieldId'  => 1,
    286                                         'operator' => 'is',
    287                                         'value'    => esc_html__( 'Check Form Helper', 'checkview' ),
    288                                     ),
    289                                 ),
    290                             ),
    291                         );
    292                     }
    293                 }
    294             }
    295             return $feeds;
     276            return array();
    296277        }
    297278    }
  • checkview/trunk/includes/formhelpers/class-checkview-ninja-forms-helper.php

    r3189448 r3193360  
    9393                );
    9494            }
     95
     96            // Disable form actions.
     97            // add_filter(
     98            //  'ninja_forms_submission_actions',
     99            //  array(
     100            //      $this,
     101            //      'checkview_disable_form_actions',
     102            //  ),
     103            //  99,
     104            //  3
     105            // );
    95106        }
    96107
     
    204215            return $fields;
    205216        }
     217
     218        /**
     219         * Disables Form actions.
     220         *
     221         * @param array $form_cache_actions form actions.
     222         * @param array $form_cache form cache.
     223         * @param array $form_data form data.
     224         * @return array
     225         */
     226        public function checkview_disable_form_actions( $form_cache_actions, $form_cache, $form_data ) {
     227            // List of allowed action types.
     228            $allowed_actions = array( 'email', 'successmessage', 'save' );
     229
     230            // Iterate over each action and check type.
     231            foreach ( $form_cache_actions as &$action ) {
     232                // Check if the type is in allowed types.
     233                if ( ! in_array( $action['settings']['type'], $allowed_actions ) ) {
     234                    $action['settings']['active'] = 0; // Set active to 0 if type is not in allowed types.
     235                }
     236            }
     237            return $form_cache_actions;
     238        }
    206239    }
    207240
  • checkview/trunk/includes/formhelpers/class-checkview-wpforms-helper.php

    r3189448 r3193360  
    6969            );
    7070
    71             remove_action( 'wpforms_frontend_output', array( wpforms()->get( 'frontend' ), 'recaptcha' ), 20 );
     71            remove_action(
     72                'wpforms_frontend_output',
     73                array(
     74                    wpforms()->get( 'frontend' ),
     75                    'recaptcha',
     76                ),
     77                20
     78            );
    7279
    7380            add_action(
     
    110117            );
    111118            // bypass hcaptcha.
    112             add_filter( 'hcap_activate', '__return_false' );
     119            add_filter(
     120                'hcap_activate',
     121                '__return_false'
     122            );
    113123            // bypass akismet.
    114124            add_filter(
  • checkview/trunk/includes/formhelpers/class-checkview-wsf-helper.php

    r3189448 r3193360  
    8181                2
    8282            );
    83             add_filter( 'wsf_config_meta_keys', array( $this, 'config_meta_keys' ), 10, 2 );
     83            add_filter(
     84                'wsf_config_meta_keys',
     85                array( $this, 'config_meta_keys' ),
     86                10,
     87                2
     88            );
     89
     90            // add_filter(
     91            //  'wsf_action_post_do',
     92            //  array( $this, 'checkview_disable_addons_feed' ),
     93            //  99,
     94            //  6
     95            // );
    8496        }
    8597
     
    208220            return $form;
    209221        }
     222
     223        /**
     224         * Disable addons feed.
     225         *
     226         * @param boolean $run run action or not.
     227         * @param object  $form form object.
     228         * @param object  $submit submit object.
     229         * @param array   $action_id_filter array of filters.
     230         * @param boolean $database_only save to db.
     231         * @param array   $config config.
     232         * @return boolean
     233         */
     234        public function checkview_disable_addons_feed( $run, $form, $submit, $action_id_filter, $database_only, $config ): bool {
     235            $skip_actions = array( 'database', 'message', 'email' );
     236            if ( in_array( $config['id'], $skip_actions, true ) ) {
     237                return true;
     238            }
     239            return false;
     240        }
    210241    }
    211242
  • checkview/trunk/includes/woocommercehelper/class-checkview-blocks-payment-gateway.php

    r3189587 r3193360  
    7070            : array(
    7171                'dependencies' => array(),
    72                 'version'      => '2.0.4',
     72                'version'      => '2.0.5',
    7373            );
    7474        $script_url        = CHECKVIEW_URI . $script_path;
  • checkview/trunk/includes/woocommercehelper/class-checkview-woo-automated-testing.php

    r3189448 r3193360  
    5151
    5252    /**
     53     * Suppresses webhooks.
     54     *
     55     * @since    1.0.0
     56     * @access   private
     57     * @var      bool/class    $suppress_webhook    The hooks loader of this plugin.
     58     */
     59    private $suppress_webhook;
     60
     61    /**
    5362     * Initialize the class and set its properties.
    5463     *
     
    6069    public function __construct( $plugin_name, $version, $loader ) {
    6170
    62         $this->plugin_name    = $plugin_name;
    63         $this->version        = $version;
    64         $this->loader         = $loader;
    65         $this->suppress_email = get_option( 'disable_email_receipt', false );
    66 
     71        $this->plugin_name      = $plugin_name;
     72        $this->version          = $version;
     73        $this->loader           = $loader;
     74        $this->suppress_email   = get_option( 'disable_email_receipt', false );
     75        $this->suppress_webhook = get_option( 'disable_webhooks', false );
    6776        if ( $this->loader ) {
    6877            $this->loader->add_action(
     
    672681                $payment_method  = ( \is_object( $order ) && \method_exists( $order, 'get_payment_method' ) ) ? $order->get_payment_method() : false;
    673682                $payment_made_by = $order->get_meta( 'payment_made_by' );
    674                 if ( ( $payment_method && 'checkview' === $payment_method ) || ( 'checkview' === $payment_made_by ) ) {
     683                if ( ( $payment_method && 'checkview' === $payment_method && ( true === $this->suppress_webhook || 'true' === $this->suppress_webhook ) ) || ( 'checkview' === $payment_made_by && ( true === $this->suppress_webhook || 'true' === $this->suppress_webhook ) ) ) {
    675684                    return false;
    676685                }
     
    683692                $payment_method  = ( \is_object( $order ) && \method_exists( $order, 'get_payment_method' ) ) ? $order->get_payment_method() : false;
    684693                $payment_made_by = is_object( $order ) ? $order->get_meta( 'payment_made_by' ) : '';
    685                 if ( ( $payment_method && 'checkview' === $payment_method ) || ( 'checkview' === $payment_made_by ) ) {
     694                if ( ( $payment_method && 'checkview' === $payment_method && ( true === $this->suppress_webhook || 'true' === $this->suppress_webhook ) ) || ( 'checkview' === $payment_made_by && ( true === $this->suppress_webhook || 'true' === $this->suppress_webhook ) ) ) {
    686695                    return false;
    687696                }
     
    758767        if ( empty( $orders ) ) {
    759768            $args = array(
    760                 'limit'          => -1,
    761                 'payment_method' => 'checkview',
    762                 'meta_query'     => array(
     769                'limit'      => -1,
     770                'meta_query' => array(
    763771                    array(
    764                         'relation' => 'AND', // Use 'AND' for both conditions to apply.
     772                        'relation' => 'OR', // Use 'AND' for both conditions to apply.
    765773                        array(
    766774                            'key'     => 'payment_made_by', // Meta key for payment method.
     
    768776                            'compare' => '=', // Use '=' for exact match.
    769777                        ),
     778                        array(
     779                            'key'     => 'payment_method', // Meta key for payment method.
     780                            'value'   => 'checkview', // Replace with your actual payment gateway ID.
     781                            'compare' => '=', // Use '=' for exact match.
     782                        ),
    770783                    ),
    771784                ),
     
    775788            }
    776789        }
     790
    777791        // Delete orders.
    778792        if ( ! empty( $orders ) ) {
     
    780794
    781795                try {
    782                     $order_object = new WC_Order( $order->id );
    783                     $customer_id  = $order_object->get_customer_id();
     796                    $order_id     = is_a( $order, 'WC_Order' ) ? $order->get_id() : $order->ID;
     797                    $order_object = wc_get_order( $order_id );
    784798
    785799                    // Delete order.
    786800                    if ( $order_object ) {
     801                        $customer_id = $order_object->get_customer_id();
    787802                        $order_object->delete( true );
    788803                        delete_transient( 'checkview_store_orders_transient' );
    789                     }
    790 
    791                     $order_object = null;
    792                     $current_user = get_user_by( 'id', $customer_id );
    793                     // Delete customer if available.
    794                     if ( $customer_id && isset( $current_user->roles ) && ! in_array( 'administrator', $current_user->roles ) ) {
    795                         $customer = new WC_Customer( $customer_id );
    796 
    797                         if ( ! function_exists( 'wp_delete_user' ) ) {
    798                             require_once ABSPATH . 'wp-admin/includes/user.php';
     804
     805                        $order_object = null;
     806                        $current_user = get_user_by( 'id', $customer_id );
     807                        // Delete customer if available.
     808                        if ( $customer_id && isset( $current_user->roles ) && isset( $current_user->roles ) && ! in_array( 'administrator', $current_user->roles, true ) ) {
     809                            $customer = new WC_Customer( $customer_id );
     810
     811                            if ( ! function_exists( 'wp_delete_user' ) ) {
     812                                require_once ABSPATH . 'wp-admin/includes/user.php';
     813                            }
     814
     815                            $res      = $customer->delete( true );
     816                            $customer = null;
    799817                        }
    800 
    801                         $res      = $customer->delete( true );
    802                         $customer = null;
    803818                    }
    804819                } catch ( \Exception $e ) {
Note: See TracChangeset for help on using the changeset viewer.