我写了一个插件,在管理设置选项中显示woocommerce商店中的所有产品,现在我想添加一个链接,以CSV文件的形式下载产品。
问题是,当我单击链接时,会出现权限错误,表示我没有查看此页面的权限。
这是我的代码:
function extra_tablenav($which) {
if ($which == "top") {
echo \'<h3 style="display:inline">\'
. __(\'These products are currently in the database:\')
. \'</h3>\' .
\' \' .
\'<a href="\' . admin_url(\'admin.php?page=download_csv.php\') . \'">\' . __(\'Export to CSV\') . \'</a>\';
}
}
如何修复这些权限?