Querying for multiple post types in SQL

Couple of things to note; one’s a WordPress issue, the other an SQL issue:

For WordPress, instead of editing the plugin files directly, you should use the 'getarchives_where' filter it provides, and change the query there.

For SQL, in order to query for multiple post types, you need a conditional statement in the query, so looking for both ‘privacy’ and ‘security’ post types requires an OR can be done with an IN.

WHERE post_type IN ('privacy', 'security') 
    AND post_status="publish" 
    AND post_date <= now()

Combine this with the plugin’s filter and you get:

apply_filters( 'getarchives_where', function( $where ) {
   return 'WHERE post_type IN ("privacy", "security") AND post_status = "publish" AND post_date <= now()';
    }, 10, 1 );

error code: 523