WordPress.org

Plugin Directory

Remove WooCommerce Billing Address Fields for Free Checkout

這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Remove WooCommerce Billing Address Fields for Free Checkout

外掛說明

It can be a hassle to fill out your billing address if you aren’t actually paying any money. This plugin removes the billing address fields from WooCommerce checkout when the cart total is 0, ie: Free.

Specifically the following fields are removed:

  1. billing_address_1
  2. billing_address_2
  3. billing_city
  4. billing_state
  5. billing_postcode
  6. billing_country
  7. billing_phone

That’s it!

Support

Support is handled in the WordPress forums. Please note that support is very limited. Before posting a question, please confirm that the problem still exists with a default theme and with all other plugins disabled.

Please report any bugs, errors, warnings, code problems to Github

螢幕擷圖

  • The simplified checkout form.

安裝方式

  1. Upload the plugin folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

常見問題集

How to exclude billing phone field from removal?

To achieve this you can add the following snippet to your theme’s functions.php or via the Code Snippets plugin.

/**
 * Do not remove billing phone
 *
 * @param array   $fields    The billing fields we are removing
 * @return array
 */
function kia_do_not_remove_billing_phone( $fields ) {
    return array_diff( $fields, array( 'billing_phone' ) );
}
add_filter( 'wc_billing_fields_to_remove_for_free_checkout', 'kia_do_not_remove_billing_phone' );

使用者評論

2022 年 5 月 2 日 1 則留言
WOW thank you for this miracle lol
2020 年 9 月 21 日
Fast and easy solution
2020 年 7 月 16 日 1 則留言
And there aren’t any instructions to fix it so I’ll have to use something else. 😕
2020 年 4 月 24 日
A great improvement to the user experience for free products. Thank you for turning this into a plugin!
閱讀全部 5 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Remove WooCommerce Billing Address Fields for Free Checkout〉的開發相關工作。

參與者

變更記錄

2021-12-28 – 1.0.1

  • New: Introduce wc_billing_fields_to_remove_for_free_checkout filter.
  • Fix: Do not remove address when shipping is required. Fixes “Please enter an address to continue.” error on checkout.

1.0

  • Initial release.