Only Include On Sale WooCommerce Products in Grid

The following code can be used to modify the grid's items to only include products which is on "Sale".
Only Applicable for WooCommerce Product Grids.

1. Get your grid's ID.

2. Add the following code to your theme's "functions.php" file, modifying the number "1" with your grid's ID.