Export data as CSV in back end with proper HTTP headers
I wrote a plugin that displays all products in a woocommerce store in admin settings option, now I want to add a link to download the products as CSV file. The problem is, when I click the link I get a permission error saying I don’t have permission to view this page. Here’s my code: … Read more