• Hi Lester, thanks for plugins!

    I noticed that WP Sweep transients COUNT includes options with keys like wpml_settings-transients. I believe that LIKE pattern for transients should escape underscores to prevent using them as wildcards.

    A quick fix:

    //WP Sweep
    //----------
    //repair incorrect LIKE to get transients
    add_filter( 'query', function ( $query ) {
      if ( strpos( $query, '%_transient_%' ) ) {
        $query = str_replace( '%_transient_%', '%\_transient\_%', $query );
        //error_log( $query );
      }
      return $query;
    } );

    JR

    • This topic was modified 3 years, 10 months ago by janrenn.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Incorrect COUNT of transients’ is closed to new replies.