Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?

The wordpress theme I’m using uses a custom post type called ‘coupon’ and a custom taxonomy called ‘store’. The default permalink structure for a coupon post is

site.com/coupon/CouponPost

I would like to change the permalink structure to:

site.com/%stores%/CouponPost

I used a plugin called ‘Custom Post Type Permalinks’ to add the store taxonomy to the permalink structure so it displays as:

site.com/coupon/%stores%/CouponPost

I now need to try and remove the custom post type slug ‘coupon’ from the permalink structure.

I found some code of GitHub that removes the CPT slug but causes 404 errors when the ‘Custom Post Type Permalinks’ plugin is added. When the plugin is deactivated the CPT slug is removed and everything works perfectly. The issue is getting the two to work together. I believe that removing the plugin and adding a custom rewrite rule to the CPT may do the trick but it’s way past may level of understanding so hoping some of the experts in here might know a solution!

Solutions Collecting From Web of "Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?"