October 26, 2016 at 9:18 am #239073
Lead DeveloperLead Developer
Looks good to me!
For anyone else, the above function has WooCommerce specific functions (wc_get_page_id), so if you’re not using WooCommerce and use this code, you’ll get a fatal error.
If you are using WooCommerce, it should work perfectly 🙂