Don’t know what i was thinking, must of went into auto pilot.
The Continue Shopping button only displays if either:
1. Redirect to the cart page after successful addition is enabled in Woocommerce > Settings > Products. Which displays on the Cart page.
2. Or within Display cart panel on add to cart option in Customizer > Layout > Woocommerce, when product is added from the product archives.
#1 doesn’t look like an option you require.
#2 is optional
Either of them will respond to that PHP snippet though