
內容簡介
作者:Fahad Mahmood
專案網址:http://androidbubble.com/blog/wordpress/plugins/poi-acf-for-wp
許可證:GPL 3。版權細節請見下方。
為什麼使用這個外掛?
我認識的許多開發人員都認為 Advanced Custom Fields 是他們許多網站工作不可或缺的外掛,我相信這樣的想法渗透了整個社群。WooCommerce 已經成為世界上領先的電子商務引擎相當長的一段時間。這兩個外掛都在外掛庫中使用頻率排名前幾名。因此,是時候有人編寫介於兩者之間的橋梁了。
這就是我的外掛所在。這個外掛被設計成允許管理員或開發人員使用正常的 ACF 介面創建 ACFs,並將它們分配給 WooCommerce 的一些常見頁面,而不需要任何額外的工作或代碼。現在,添加字段到結帳或我的帳戶頁面與點擊指針的難度相當,只需使用已經熟悉的 ACF(和 ACF Pro)介面即可。
現在可以做些什麼:
使用此外掛,您目前可以:
將一個字段組添加到 WooCommerce 結帳流程中
這些字段作為訂單本身的一部分保存
不要忘記在 ACF 設置中還指定發佈類型 -> 商店訂單 '位置'
將一個字段組添加到我的帳戶頁面或編輯帳單/送貨地址我的帳戶頁面中
這些字段作為用戶的一部分保存
不要忘記在 ACF 設置中還要分配用戶角色 -> 所有 '位置'
在產品分類中顯示您設置的字段
您可以將它們顯示在產品列表的上方或下方
您可以通過操作和鉤子修改輸出(針對開發人員)
未來會添加的支援:
我計劃添加以下支援:
在商店頁面上顯示字段
在產品頁面上顯示字段
為產品頁面添加選項卡
將字段組添加到產品元中並將其保存為購物車項目的一部分(例如用於個性化)
我相信還有更多我沒有想到的支援……
如果您有想法:
我始終樂於接受建議,特別是關於如何使此外掛更易用和有用的建議。如果您擁有一個未在上面列出的新功能想法,或者對上面列出的想法進行擴展,那麼來試試吧。
我真的希望這能幫助其他人,因為我知道這將幫助我,還有至少我所知道的開發人員們。
許可證
POI ACF 是自由軟件,您可以遵循 GNU 通用公共許可協議(GPL)條款進行重新分發和/或修改,不論是第二版許可還是任何隨後版本的許可。POI ACF 是按原樣提供的,概不提供商業保修,也沒有適用於特定目的的默示保證。更多詳情請參閱 GNU 通用公共許可協議。您應該已經收到了附帶 POI ACF 的 GNU 通用公共許可協議副本。如果沒有,請參閱 http://www.gnu.org/licenses/gpl-2.0.html。
外掛標籤
開發者團隊
原文外掛簡介
Author: Fahad Mahmood
Project URI: http://androidbubble.com/blog/wordpress/plugins/poi-acf-for-wp
License: GPL 3. See License below for copyright jots and titles.
Why?
Many developers I know consider Advanced Custom Fields a must have plugin on most of their website work, and I am sure that idea permeates the entire community. WooCommerce has been the leading eCommerce engine in the world, for quite some time now. Both of these plugins are in the list of the top used plugins on the repository. As such, it is about time that someone write a bridge between the two.
That is where I come in. This plugin is made to allow an admin user, or developer, to create ACFs using the normal ACF interface, and assign them to some of the common pages of WooCommerce, without any additional work, or coding. Adding fields to the checkout or My Account page is now as easy as pointing and clicking, inside the already familiar interface of ACF (and ACF Pro).
What you can do now:
Using this plugin, you currently have the ability to:
Add a field group to the WooCommerce Checkout flow
The fields save as part of the order itself
Don’t forget to also assign the Post Type -> Shop Order ‘location’ in ACF setup
Add a field group to the My Account page, or the Edit Billing/Shipping Address My Account Page
The fields save as part of the User
Don’t forget to also assign the User Role -> All ‘location’ in ACF setup
Display fields you have setup on Product Categories
You can display them above or below the list of products
You can modify the output with actions and hooks (for developers)
What is to come:
I plan on adding support to:
Display fields on the Shop page
Display fields on the Product page
Add Tabs to the Product page
Add field groups to the Product meta and have it save as part of the cart items (like for personalization)
I am sure there are more that I am not thinking of…
What if you have ideas:
I am always open to suggestions, especially on how to make this plugin more usable and useful. If you have an idea of a new feature that is not listed above, or an expansion on one of the listed ideas, then hit me up.
I really hope this helps others, because I know it will help me, and at least the devs I know.
License
POI ACF is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published bythe Free Software Foundation, either version 2 of the License, or any later version. POI ACF is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with POI ACF. If not, see http://www.gnu.org/licenses/gpl-2.0.html.
