=== Checkout Field Visibility for eCommerce === Contributors: zamartz Donate link: https://bt.zamartz.com/WooChecFielVis Tags: checkout field, ecommerce, billing, shipping, checkout block Requires at least: 7.0 Tested up to: 7.1 Requires PHP: 7.4 WC requires at least: 11.3 WC tested up to: 11.3 Stable tag: 4.0.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Hides WooCommerce billing and shipping fields at checkout, on the classic checkout and the Checkout block. == Description == Checkout Field Visibility for eCommerce hides the billing and shipping fields your shop does not need, such as the company or the second address line, with no code. What the free plugin does: * One rule set for billing fields and one for shipping fields. * Each rule set hides any of: first name, last name, email address, phone number, company, address lines 1 and 2, country, state or region, city and postal code. * Each rule set can have an order total condition (less than, greater than, less than or equal to, greater than or equal to, or equal to an amount), or no condition, so it is always used. * Works on the classic (shortcode) checkout and on the Checkout block. A hidden field is also removed when the order is placed, not only hidden on the page. * Settings under WooCommerce > Settings > Billing and WooCommerce > Settings > Shipping > Shipping Field Visibility, and the same settings under ZAMARTZ > Settings > Plugins. Administrators and WooCommerce Shop Managers can change them. = Paid add-on = A separate paid add-on, from [zamartz.com](https://zamartz.com/product/checkout-field-visibility-for-woocommerce/), adds: * More rule sets for each section, with a priority and "Stop other rules". * More conditions: order subtotal, shipping amount, tax amount, customer roles, products, product variations, product categories and coupons. * Making fields required or optional. * Hiding the whole billing or shipping section on the Checkout block. * Hiding the terms and conditions box, hiding or requiring "Create an account", and requiring the customer to be signed in. * Messages shown at checkout when a rule set applies. * Import from the older WooCommerce Hide Billing Fields plugin. The free plugin works fully without it. = What this plugin sends = Nothing, unless the site owner says yes to "Share anonymous events for ZAMARTZ plugins" (asked once in the admin, and changed any time under ZAMARTZ > Settings > General). With a yes, it sends an anonymous event to zamartz.com when the plugin is activated, deactivated (with the reason picked, if any) or deleted: the plugin's name, the event, and a one-way code made from the site's address (not the address itself). No email, user, order or shop data is sent. With the same yes, the ZAMARTZ dashboard loads news from zamartz.com once a day. Zamartz's privacy policy: https://zamartz.com/privacy-policy/ == Installation == 1. Install and activate WooCommerce. 1. Install this plugin from Plugins > Add New, or upload the plugin folder to /wp-content/plugins/, and activate it. 1. Go to WooCommerce > Settings > Billing (or WooCommerce > Settings > Shipping > Shipping Field Visibility), turn on "Hide billing fields" (or "Hide shipping fields"), tick the fields to hide, choose a condition if you want one, and save. == Frequently Asked Questions == = What is in the free plugin? = One billing rule set and one shipping rule set, each hiding any fields, with an order total condition or none, on both checkouts. = What does the paid add-on add? = See "Paid add-on" above, and the [product page](https://zamartz.com/product/checkout-field-visibility-for-woocommerce/). = Does it work with the Checkout block? = Yes. The Checkout block uses one field setup for its billing and shipping forms. When a field is hidden in one form only, the plugin hides it there with a small script and empties it on the server when the order is placed. = How do I remove the dashboard ads? = They are not shown on sites with an active paid add-on license, and each box can be closed. = What does deleting the plugin remove? = Its own settings. While the paid add-on 4.0.3 or later is installed, the rule sets and section switches stay for the add-on, which removes them when it is deleted itself; beside an earlier add-on they are removed with the plugin. == Screenshots == 1. The billing rule set under WooCommerce > Settings > Billing. 2. The same settings under ZAMARTZ > Settings > Plugins. == Changelog == = 4.0.4 = * Improved: the ZAMARTZ screens and the deactivation pop-up are updated, and now match the other Zamartz plugins. Your settings and rule sets are unchanged. = 4.0.3 = * Improved: hiding fields now also works when the Checkout block sits in a synced pattern, a template part, a widget area or a shortcode, and a hidden field is no longer required for any country you sell to. * Improved: better handling of "Use same address for billing". A field the billing address needs stays in the shipping form until a separate billing form is shown, and an empty one is named plainly ("Last name is a required field."). * Refined: rule set messages are kept exactly as you type them, "&", "<", ">" and link addresses included. * More reliable settings saves, and maintenance and compatibility improvements. = 4.0.2 = * With the paid add-on: a field a rule set requires that the store hides (such as Company on the Checkout block) is now shown in that address form. * Upgrade notices are shorter. * Maintenance and compatibility improvements, with no change to how checkout works. = 4.0.1 = * New plugin icon, banners and ZAMARTZ dashboard picture. * Improved accessibility on the Checkout block: screen readers hear when fields are no longer needed or needed again, and a field never disappears while the shopper is typing in it. * Hiding fields now also works for a Checkout block on a page other than the shop's checkout page. * A rule set whose operator does not fit its condition now waits until you choose one on the settings screen (earlier versions used it on every order or never); the settings screen and ZAMARTZ > Status show which ones. * Refined settings: saving without changes keeps every stored amount and operator, the screen says plainly when a saved condition is not checked by this plugin, the one-time add-on notice and the add-on row on ZAMARTZ > Status were removed, and the translation template is complete. = 4.0.0 = * Changed: the paid features (more rule sets, conditions other than the order total, required fields, hiding a whole section, terms, create account and signed-in rules, messages, import, the search results setting and the network screen) moved to the paid add-on from zamartz.com. A site with a license installs the add-on to keep them; the license carries over with nothing to enter again. Nothing paid became free and nothing free became paid. * Changed: "Stop other rules" (paid add-on) now ends the checking only when its own rule set applies. * New: the free rule set's order total condition is saved and used; a rule set saved by 2.0.0 has no condition and keeps applying to every order. * New: the settings are in WooCommerce's settings and in ZAMARTZ > Settings > Plugins. WooCommerce Shop Managers can change the rule sets. * Improved Checkout block and classic checkout support, amounts such as "19,99" read as 19.99, more secure settings saves, and compatibility with PHP 8. * Deleting the plugin removes its own settings, rule sets included; it never removes the license or the paid add-on's settings. * Requires WordPress 7.0, PHP 7.4 and WooCommerce 11.3. = 2.0.0 = * NEW: WooCommerce Checkout Blocks support, with a shared rules engine for classic and block checkout. * NEW: Block checkout field hide and required, hiding billing and shipping sections, terms, create account and logged-in requirements, and rule set messages in the Store Notices block (paid). * IMPROVED: Order total and subtotal conditions follow WooCommerce cart totals; coupon matching supports coupon codes and legacy IDs. = 1.5.0 = * Updated accepted product IDs and improved order total validation. = 1.4.0 = * Security fix: patched a path traversal problem in the admin settings, and improved input validation for admin settings tabs. = 1.0.0 = * First version, replacing the legacy plugin WooCommerce Hide Billing Fields. == Upgrade Notice == = 4.0.4 = The ZAMARTZ screens and the deactivation pop-up are updated. Nothing else changes and no action is needed. = 4.0.3 = Hiding now also works for the Checkout block in patterns, template parts, widgets and shortcodes, with better handling of same-address checkouts. Nothing to do. = 4.0.2 = Maintenance and compatibility improvements. Nothing to do; your settings are unchanged. = 4.0.1 = New images and better Checkout block accessibility. A rule set whose operator does not fit its condition waits until you choose one on the settings screen. Your saved settings are not changed. = 4.0.0 = Paid features move to a separate paid add-on from zamartz.com; your rule sets and license are kept. Licensed sites: install the add-on before updating. "Stop other rules" now stops only when its own rule set applies.