{"id":7742,"date":"2020-08-26T21:50:40","date_gmt":"2020-08-26T13:50:40","guid":{"rendered":"https:\/\/blog.naibabiji.com\/?p=7742"},"modified":"2020-08-26T21:50:56","modified_gmt":"2020-08-26T13:50:56","slug":"remove-downloads-from-account-page","status":"publish","type":"post","link":"https:\/\/blog.naibabiji.com\/woocommerce\/remove-downloads-from-account-page.html","title":{"rendered":"\u5220\u9664WooCommerce\u201c\u6211\u7684\u8d26\u6237\u201d\u91cc\u9762\u7684\u201c\u4e0b\u8f7d\u201d\u9875\u9762"},"content":{"rendered":"<p>\u56fd\u5185\u5f88\u591a<a href=\"https:\/\/blog.naibabiji.com\/\">\u4f7f\u7528WordPress\u642d\u5efa\u5916\u8d38\u7f51\u7ad9<\/a>\u7684\u670b\u53cb\u5728\u8fdb\u884c2c\u4e1a\u52a1\u7684\u65f6\u5019\uff0c\u90fd\u4f1a\u91c7\u7528WooCommerce\u6765\u505a\u7535\u5b50\u5546\u52a1\u7684\u529f\u80fd\u3002\u4e0d\u8fc7\u9ed8\u8ba4\u7684\u5b89\u88c5\u5b8c\u6bd5WooCommerce\u540e\uff0c\u5728\u7528\u6237\u8d26\u6237\uff08account page\uff09\u4e0a\u9762\uff0c\u83dc\u5355\u4f1a\u51fa\u73b0\u4e00\u4e2adownloads\u7684\u9875\u9762\u3002<\/p>\n<p>\u5bf9\u4e8e\u5927\u591a\u6570\u5916\u8d38\u7f51\u7ad9\u6765\u8bf4\uff0c\u9500\u552e\u7684\u90fd\u662f\u5b9e\u4f53\u5546\u54c1\uff0c\u800c\u8fd9\u4e2a\u4e0b\u8f7d\u9875\u9762\u6ca1\u6709\u5fc5\u8981\uff0c\u540c\u65f6\u53ef\u80fd\u8fd8\u4f1a\u5f15\u8d77\u7528\u6237\u7684\u7591\u95ee\uff0c\u672c\u6587\u5976\u7238\u5efa\u7ad9\u7b14\u8bb0\u5c31\u6559\u5927\u5bb6<strong>\u5982\u4f55\u628a\u201c\u4e0b\u8f7d\u9875\u9762\u201d\u4eceWooCommerce\u201c\u6211\u7684\u8d26\u6237\u201d\u9875\u9762\u5220\u9664<\/strong>\u3002<\/p>\n<h3>\u65b9\u6cd5\u4e00\u3001\u8bbe\u7f6e\u91cc\u9762\u5220\u9664\u9009\u9879<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"549\" height=\"578\" class=\"alignnone wp-image-7743 size-full\" src=\"https:\/\/edgeone.naibabiji.com\/wp-content\/uploads\/2020\/08\/Pasted-into-\u5220\u9664WooCommerce\u6211\u7684\u8d26\u6237\u91cc\u9762\u7684\u4e0b\u8f7d\u9875\u9762.png\" \/><\/p>\n<p>\u8fdb\u5165WooCommerce\u8bbe\u7f6e\uff0c\u9ad8\u7ea7\uff0c\u8d26\u6237\u7aef\u70b9\uff08WooCommerce &gt; Settings &gt; Advanced &gt; Account endpoints\uff09\uff0c\u7136\u540e\u5220\u6389\u4e0b\u8f7d\u9875\u9762\u540e\u9762\u7684\u53c2\u6570\uff0c\u4fdd\u5b58\u3002\u7f51\u7ad9\u524d\u53f0\u5c31\u770b\u4e0d\u5230\u4e0b\u8f7d\u754c\u9762\u4e86\u3002<\/p>\n<h3>\u65b9\u6cd5\u4e8c\u3001\u4f7f\u7528\u4ee3\u7801\u5220\u9664<\/h3>\n<p>\u4f7f\u7528\u4ee3\u7801\u5220\u9664\u7684\u65b9\u6cd5\u4e5f\u5f88\u65b9\u4fbf\uff0c\u76f4\u63a5\u590d\u5236\u4e0b\u9762\u7684\u4ee3\u7801\u5230\u4f60\u4e3b\u9898\u51fd\u6570\u91cc\u9762\u4fdd\u5b58\u540e\u5373\u53ef\u751f\u6548\u3002<\/p>\n<pre>function custom_my_account_menu_items( $items ) { \r\nunset($items['downloads']); \r\nreturn $items; \r\n} \r\nadd_filter( 'woocommerce_account_menu_items', 'custom_my_account_menu_items' );<\/pre>\n<p>\u901a\u8fc7\u4e0a\u9762\u8fd9\u4e24\u79cd\u65b9\u6cd5\u5c31\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u4eceWooCommerce\u7684\u8d26\u6237\u9875\u9762\u5220\u9664\u4e0b\u8f7d\u9875\u9762\u4e86\u3002<\/p>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;7742&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;1&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;4&quot;,&quot;greet&quot;:&quot;\u7ed9\u672c\u6587\u6253\u5206 post&quot;,&quot;legend&quot;:&quot;5\\\/5 - (1 vote)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;\u5220\u9664WooCommerce\u201c\u6211\u7684\u8d26\u6237\u201d\u91cc\u9762\u7684\u201c\u4e0b\u8f7d\u201d\u9875\u9762&quot;,&quot;width&quot;:&quot;138&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 138px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            5\/5 - (1 vote)    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u56fd\u5185\u5f88\u591a\u4f7f\u7528WordPress\u642d\u5efa\u5916\u8d38\u7f51\u7ad9\u7684\u670b\u53cb\u5728\u8fdb\u884c2c\u4e1a\u52a1\u7684\u65f6\u5019\uff0c\u90fd\u4f1a\u91c7\u7528WooCommerce\u6765\u505a\u7535\u5b50\u5546 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7744,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"\u5220\u9664WooCommerce\u201c\u6211\u7684\u8d26\u6237\u201d\u91cc\u9762\u7684\u201c\u4e0b\u8f7d\u201d\u9875\u9762 - \u5976\u7238\u5efa\u7ad9\u7b14\u8bb0","description":"\u56fd\u5185\u5f88\u591a \u4f7f\u7528WordPress\u642d\u5efa\u5916\u8d38\u7f51\u7ad9 \u7684\u670b\u53cb\u5728\u8fdb\u884c2c\u4e1a\u52a1\u7684\u65f6\u5019\uff0c\u90fd\u4f1a\u91c7\u7528WooCommerce\u6765\u505a\u7535\u5b50\u5546\u52a1\u7684\u529f\u80fd\u3002\u4e0d\u8fc7\u9ed8\u8ba4\u7684\u5b89\u88c5\u5b8c\u6bd5WooCommerce\u540e\uff0c\u5728\u7528\u6237\u8d26\u6237\uff08account page\uff09\u4e0a\u9762\uff0c\u83dc\u5355\u4f1a\u51fa\u73b0\u4e00\u4e2adownloads\u7684\u9875\u9762\u3002 \u5bf9\u4e8e\u5927\u591a\u6570\u5916\u8d38\u7f51\u7ad9\u6765\u8bf4\uff0c\u9500\u552e\u7684\u90fd\u662f\u5b9e\u4f53\u5546\u54c1\uff0c\u800c\u8fd9\u4e2a\u4e0b\u8f7d\u9875\u9762\u6ca1\u6709\u5fc5\u8981"},"footnotes":""},"categories":[405],"tags":[],"class_list":["post-7742","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-woocommerce"],"_links":{"self":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts\/7742","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/comments?post=7742"}],"version-history":[{"count":0,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts\/7742\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/media\/7744"}],"wp:attachment":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/media?parent=7742"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/categories?post=7742"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/tags?post=7742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}