WP Manifestindependent plugin directory
manifest / ecommerce / woocommerce-checkout-field-toggle

WooCommerce Checkout Field Toggle

Easily hide or show specific checkout fields (Company, Phone, Address 2) in WooCommerce checkout page from admin settings.

by Mehran Khan · github.com/mehrankhan38/woocommerce-checkout-field-toggle · website

1stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/mehrankhan38/woocommerce-checkout-field-toggle/archive/refs/heads/main.zip

A free WordPress plugin that allows you to easily hide or show specific checkout fields (Company, Phone, Address 2) in WooCommerce checkout page from admin settings.

Description

This lightweight plugin gives you complete control over the visibility of checkout fields. Instead of modifying code or using complex filters, you can now toggle the visibility of Company, Phone, and Address Line 2 fields with a simple dropdown in the admin panel.

Features

  • ✅ Toggle Company field visibility (billing & shipping)
  • ✅ Toggle Phone field visibility
  • ✅ Toggle Address Line 2 field visibility (billing & shipping)
  • ✅ Easy-to-use admin interface
  • ✅ Instant effect after saving settings
  • ✅ Lightweight and fast
  • ✅ Free and open source
  • ✅ Multisite compatible

Installation

Method 1: Manual Installation

  1. Download the plugin ZIP file from the Releases page
  2. Go to WordPress Admin → Plugins → Add New
  3. Click "Upload Plugin" and select the ZIP file
  4. Click "Install Now" and then "Activate"

Method 2: Git Clone

cd wp-content/plugins/
git clone https://github.com/mehran0038/woocommerce-checkout-field-toggle.git

Then activate the plugin from WordPress Admin → Plugins

Requirements

  • WordPress 5.0 or higher
  • WooCommerce 3.0 or higher
  • PHP 7.2 or higher

Usage

  1. Activate the Plugin

    • Go to WordPress Admin → Plugins
    • Find "WooCommerce Checkout Field Toggle" and click "Activate"
  2. Configure Settings

    • Go to WooCommerce → Checkout Field Toggle
    • For each field (Company, Phone, Address 2), select:
      • Show: Display the field on checkout page
      • Hide: Hide the field from checkout page
  3. Save Settings

    • Click "Save Settings" button
    • Changes take effect immediately
  4. Test

    • Go to your store's checkout page
    • Verify that the fields are shown or hidden according to your settings

How It Works

  • The plugin uses WooCommerce filters to modify checkout fields
  • When you hide a field, it's completely removed from the checkout form
  • Hidden fields won't be required for order completion
  • Settings are stored in WordPress options and persist across updates

Supported Fields

  • Company Field: Controls both billing and shipping company fields
  • Phone Field: Controls the billing phone field
  • Address Line 2: Controls both billing and shipping address line 2 fields (Apartment, suite, unit, etc.)

Screenshots

Admin Settings Page

The plugin provides a simple and intuitive admin interface where you can toggle field visibility with dropdown menus.

Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with details about your problem
  3. Include WordPress, WooCommerce, and PHP versions

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Changelog

1.0.0

  • Initial release
  • Toggle Company field visibility
  • Toggle Phone field visibility
  • Toggle Address Line 2 field visibility
  • Admin settings page
  • Multisite support

License

This plugin is licensed under the GPL v2 or later.

Copyright (C) 2024 Mehran Khan

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program 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.

Credits

Developed with ❤️ for the WooCommerce community.

Author

Mehran Khan - Portfolio

Developed by Mehran Khan. Visit portfolio.gitxpert.com for more information.