Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • mwschaff

    Thanks for the rollback plugin hint!

    Updated to 1.7.5 and so far no new errors, hopefully fixed. Thanks!

    • This reply was modified 6 months, 3 weeks ago by peterpp.

    Same issue, I do not use eliminator and v1.7.3 was working OK, site updated plugin to v1.7.4 and now a constant stream of ” Fatal error: Uncaught Error: Class “Elementor\Plugin” not found” messages in the error log.

    Is there a d/l for 1.7.3 somewhere so could roll back?

    Thread Starter peterpp

    (@ppauer)

    Good suggestion wp_remote_get seems to work OK,

    attached the code snip I have working now in the recaptcha_v3 script

                   $recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';
    
    // PP start segment reworked using wp_remote_get to work with servers that do not permit php remote file access
    //		$recaptcha = file_get_contents( $recaptcha_url . '?secret=' . $secret . '&response=' . $token ); -- line replaced by following code.
         $remoteip = $_SERVER['REMOTE_ADDR'];
         $recaptcha_response = wp_remote_get( $recaptcha_url . '?secret=' . $secret . '&response=' . $token );
         if ( is_wp_error( $recaptcha_response ) ) {
           error_log( 'ReCaptcha log 99 - ReCaptcha error: ' . print_r( $recaptcha_response, 1 ) );
           }
    
        $recaptcha = json_decode( wp_remote_retrieve_body( $recaptcha_response ), TRUE );
      	$score = 0.1;
     	$score = $recaptcha['score'];
    
    	if ( $score >= 0.5 ) {
    // uncomment next line to log each successful comment in log file  
    //    	   error_log ( 'ReCaptcha log 42 - RemoteIP: ' . print_r($remoteip, 1) . ' Score: ' . print_r( $score, 1) . ' from: '. print_r($form['from'],1) . ' name: '. print_r($form['name'],1) .' - Logging');
    	   return $error;
    	   }
    	
        error_log ( 'ReCaptcha log 69 - RemoteIP: ' . print_r($remoteip, 1) . ' Score: ' . print_r( $score, 1) . ' from: '. print_r($form['from'],1) . ' name: '. print_r($form['name'],1) .' - rejected');
        $ramuline = 'Google ReCaptcha flagged your message as possible spam, your message was <strong>not</strong> sent. <br /> We are truly sorry if it is a mistake, and in that case, please try to submit this form again. <br /> Logged IP: ' . $remoteip;
        return __($ramuline, 'contact-form-block' );
    	
    // PP end segment rework using wp_remote_get
Viewing 3 replies - 1 through 3 (of 3 total)