The safest way to run custom snippets is to put them in a small functionality plugin instead of your theme, so they survive theme switches and updates.
There are two easy approaches.
Create a plugin by hand. Add a file at /wp-content/plugins/coupon-creator-snippets/coupon-creator-snippets.php with this header:
<?php
/*
Plugin Name: Coupon Creator Snippets
Description: Custom snippets for Coupon Creator.
Author: Your Name
Version: 1.0
*/
Add your code below the closing */, without opening a second <?php tag (a duplicate opening tag causes a fatal error). Then activate the plugin from Plugins in your admin.
Use a snippets plugin. If you would rather not touch files, install a plugin such as Code Snippets from the WordPress plugin directory. It lets you add, enable, and disable PHP snippets from the admin with a safety check that catches fatal errors before they take your site down. This is the modern replacement for older "create a plugin from the admin" tools.
Putting snippets in a functionality plugin (rather than your theme's functions.php) means they keep working when you change themes and are easy to disable if something goes wrong.