get_var( $wpdb->prepare( "SELECT COUNT(DISTINCT post_id) FROM {$wpdb->postmeta} WHERE meta_key = %s", MetaKeys::ROLLUP ) ); } public static function reset(): int { $count = self::markedCount(); foreach ( MetaKeys::allKeys() as $key ) { delete_post_meta_by_key( $key ); } ProductFilterMapper::invalidateProductListCache(); do_action( 'aipt_content_marks_reset', $count ); return $count; } }