前言介紹
- 這款 WordPress 外掛「F4 Simple Checkout Fields for WooCommerce」是 2019-03-01 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2024-04-02,距離現在已有 397 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
shop | fields | checkout | ecommerce | woocommerce |
內容簡介
使用 F4 Simple Checkout Fields for WooCommerce 插件,您可以簡單地為 WooCommerce 結帳頁面添加新的欄位。插件沒有 UI 管理欄位,只能透過簡單的 PHP 方法添加欄位。這保證了插件輕量且易於處理,但需要一些 PHP 知識和存取檔案系統的權限來添加程式碼(建議使用您的 WordPress 主題)。
使用方式
如果您第一次安裝此插件,它將不會產生任何作用。但它提供了一種方法,可以為您的結帳頁面添加任意數量的自訂欄位。下面是一個範例,展示如何為帳單地址和送貨地址添加一個簡單的文字欄位:
add_action('init', function() {
F4\WCSCF\Core\Helpers::register_field(array(
'name' => 'demo-text',
'type' => 'text',
'label' => 'Text Field'
));
});
引數
register_field 方法提供了很多引數來自訂您的欄位。其中一些引數與 官方 WooCommerce 引數 非常相似:
F4\WCSCF\Core\Helpers::register_field(array(
// (array) 定義欄位應添加到哪裡
// billing = 帳單地址,shipping = 送貨地址
'target' => array('billing', 'shipping'),
// (string) 欄位內部名稱。必須唯一
'name' => '',
// (string) 欄位類型(text、textarea、password、select)
'type' => 'text',
// (string) 欄位標籤
'label' => '',
// (string) 欄位說明
'description' => '',
// (string) 輸入框預設文字(僅限 text、textarea 和 password)
'placeholder' => '',
// (boolean) 定義欄位是否為必填欄位
'required' => false,
// (string) 預設值
'default' => '',
// (array) CSS 類別陣列,用於添加至該欄位
'class' => array(),
// (array) 欄位選項陣列(僅限 select 欄位)
// Array key => value pairs: array('value' => 'Label')
'options' => array(),
// (string|array) 定義欄位應加入的位置
// last = 在最後一個欄位後新增
// first = 在第一個欄位前新增
// array('before' => 'fieldname') = 在所定義欄位之前新增
// array('after' => 'fieldname') = 在所定義欄位之後新增
'position' => 'last', // 'first', 'last', array('before' => ''), array('after' => '')
// (string) 格式化地址輸出時使用的分隔符號
'formatted_address_delimiter' => "\n",
// (boolean) 定義欄位是否顯示於訂單後台格式化地址之後
'show_after_formatted_admin_order_address' => false,
// (boolean) 定義欄位標籤是否應在格式化地址之前輸出
'show_formatted_address_label' => false,
// (boolean) 定義欄位是否顯示於帳單地址表單
'show_in_address_form' => true,
// (boolean) 定義欄位是否顯示於結帳表單
'show_in_order_form' => true,
// (boolean) 定義欄位是否顯示於格式化地址之中
'show_in_formatted_address' => true,
// (boolean) 定義欄位是否顯示於我的帳戶地址表單
'show_in_account_address' => true,
));
原文外掛簡介
With F4 Simple Checkout Fields for WooCommerce you can simply add new fields to the WooCommerce checkout. There is no UI to manage the fields, they only can be added with a simple PHP method. That ensures that the plugin is lightweight and easy to handle, even though you need simple PHP knowledge and access to the file system to add the code (preferred your WordPress theme).
Usage
If you first install this plugin, it will do nothing. But it provides a method to add as many custom fields to your checkout as you need. Here’s a sample how you could add a simple text field to the billing and shipping address:
add_action('init', function() {
F4\WCSCF\Core\Helpers::register_field(array(
'name' => 'demo-text',
'type' => 'text',
'label' => 'Text Field'
));
});
Arguments
The register_field method provides a lot of arguments to customize your fields. Some of the arguments are identically to the officiel WooCommerce arguments:
F4\WCSCF\Core\Helpers::register_field(array(
// (array) Defines where the field should be added
// billing = billing address, shipping = shipping address
'target' => array('billing', 'shipping'),
// (string) The internal name for the field. Must be unique
'name' => '',
// (string) The field type (text, textarea, password, select)
'type' => 'text',
// (string) The field label
'label' => '',
// (string) The description
'description' => '',
// (string) The placeholder for the input (only text, textarea or password)
'placeholder' => '',
// (boolean) Defines if the field is required or not
'required' => false,
// (string) The default value
'default' => '',
// (array) An array with css classes that should be added to the field
'class' => array(),
// (array) An array with field options (only for field type select)
// Array key => value pairs: array('value' => 'Label')
'options' => array(),
// (string|array) Defines the position, where the field should be added
// last = append after the last field
// first = prepend before the first field
// array('before' => 'fieldname') = prepend before the defined field
// array('after' => 'fieldname') = append after the defined field
'position' => 'last', // 'first', 'last', array('before' => ''), array('after' => '')
// (string) The delimiter that should be used in the formatted address outputs
'formatted_address_delimiter' => "\n",
// (boolean) Defines if the field should be displayed after the formatted address in the order backend or not
'show_after_formatted_admin_order_address' => false,
// (boolean) Defines if the field label should be prepended before the field value in formatted address
'show_formatted_address_label' => false,
// (boolean) Defines if the field should be displayed in the account address forms
'show_in_address_form' => true,
// (boolean) Defines if the field should be displayed in the checkout forms
'show_in_order_form' => true,
// (boolean) Defines if the field should be displayed in the formatted address
'show_in_formatted_address' => true,
// (boolean) Defines if the field should be displayed in the admin user form
'show_in_admin_user_form' => true,
// (boolean) Defines if the field should be displayed in the admin order form
'show_in_admin_order_form' => true,
// (boolean) Defines if the field should be displayed in the privacy customer data
'show_in_privacy_customer_data' => true,
// (boolean) Defines if the field should be displayed in the privacy order data
'show_in_privacy_order_data' => true
));
Features overview
Adds custom text, textarea, password and select fields to the checkout
Easy to use
Lightweight and optimized
100% free!
Planned features
Full integration into API and REST
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「F4 Simple Checkout Fields for WooCommerce」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.0 | 1.0.1 | 1.0.2 | 1.0.3 | 1.0.4 | 1.0.5 | 1.0.6 | 1.0.7 | 1.0.8 | 1.0.9 | trunk | 1.0.10 | 1.0.11 | 1.0.12 | 1.0.13 | 1.0.14 | 1.0.15 |
延伸相關外掛(你可能也想知道)
Advanced Custom Fields (ACF®) 》Advanced Custom Fields 可以讓 WordPress 網站成為一個完整的內容管理系統,提供您所有工具以更好管理您的數據。, 使用 Advanced Custom Fields 外掛,完全...。
CMB2 》CMB2 是一個開發人員的工具包,用於在 WordPress 上構建 metabox,自定義字段和表單,可以讓您震撼。輕鬆管理帖子、條款、用戶、評論的元數據,或創建自定義...。
Advanced Custom Fields: Extended 》🚀 全方位增強套件,可改進WordPress和Advanced Custom Fields。此外掛旨在提供一個強大的管理框架,涵蓋了眾多改進和優化。, 此外掛需要至少 ACF Pro 5.8。,...。
Dynamic Conditions 》Dynamic Conditions 是一個 Elementor 外掛,加入了條件邏輯來顯示或隱藏不同元素。該外掛將條件添加到動態標籤中,以顯示/隱藏小工具或區塊。, 此外掛需要 E...。
ACF Photo Gallery Field 》t; 'Status', , 'name' => 'status', , 'choices' => array(, 'public' => 'Public', , 'private' => ...。
Custom Field Suite 》Custom Field Suite (CFS) 讓您為文章添加自定義欄位。它輕量級且經過過往使用者的測試(很難出現錯誤)。, 需要了解的事項, , 我們不提供支援。, 這是一個免...。
Custom Field Template 》「Custom Field Template 外掛」在「編寫文章/頁面」時,新增自訂欄位的預設設定。這個模板格式基本上跟「rc:custom_field_gui 外掛」差不多,不同處在於:, ...。
Custom Block Builder – Lazy Blocks 》WordPress 自訂區塊外掛程式, ★★★★★, 開發商使用於 WordPress 自訂區塊的魔法棒。我們創建了 Lazy Blocks WordPress 外掛程式,協助每位開發商取得他們需要的...。
Secure Custom Fields 》總結:SCF 是一款能夠擴展 WordPress 功能的外掛,使其成為一個靈活的內容管理工具。透過 SCF,管理自定義數據變得簡單高效。, , 1. 為什麼 SCF 是一個靈活的...。
Genesis Custom Blocks 》Genesis Custom Blocks 為 WordPress 開發人員提供了必要的工具,以應對現代 WordPress 「區塊先行」的實境。, WordPress 區塊編輯器(又稱 Gutenberg)為我...。
Product Input Fields for WooCommerce 》Product Input Fields for WooCommerce 插件可讓您在 WooCommerce 產品的前端添加自定義輸入字段,以供顧客在添加產品到購物車之前填寫。, 可以全域性地(即...。
BuddyPress Xprofile Custom Field Types 》BuddyPress Xprofile Custom Field Types 插件為 BuddyPress 資料檔案新增了一些必要的欄位類型。, BuddyPress Xprofile Custom Field Types 與 BP Profile S...。
PixFields 》使用 PixFields,您可以擁有自訂欄位的視覺化管理工具。, 注意:此外掛不會新增任何樣式至自訂欄位的輸出結果,它僅僅新增了元數據(metadata)並提供了一種覆...。
NextGEN Custom Fields 》這款外掛是為了將自訂欄位加到卓越且受歡迎的 NextGEN Gallery 外掛而開發。只需輸入新欄位的名稱,從「輸入」、「文字區域」或「下拉式選單」中選擇,就會自...。
Just Custom Fields 》Just Custom Fields(即自定義欄位)增加了在文章、頁面(與其他自定義文章類型)和分類中添加附加欄位的功能。安裝後,您將看到一個簡單的設置頁面,易於使...。