How to disable expired listings from being deleted after 30 days

By default, all expired listings are automatically deleted after 30 days. To disable this, you can add the following code snippet into your child theme's functions.php