WP Manifestindependent plugin directory
manifest / ecommerce / woo-checkout-field-editor

Checkout Field Editor (Bangladesh Ready) for WooCommerce

Toggle WooCommerce checkout fields (show/hide, required/optional) + Bangladesh District & Sub-district dependent dropdowns.

by absoftlab · github.com/absoftlabs/woo-checkout-field-editor · website

0stars
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/absoftlabs/woo-checkout-field-editor/archive/refs/heads/main.zip

Readme

Checkout Field Editor (Bangladesh Ready) for WooCommerce

Modern, clean & flexible WooCommerce checkout field editor.
Toggle, require, reorder, resize, and add placeholders — with first-class support for Bangladesh District & Sub-district dropdowns and English ⇄ Bangla language toggle.

Author: absoftlab
Folder/Slug: abb-checkout-field-editor-bd
License: GPL-2.0-or-later


✨ Features

  • Separate tabs for Billing, Shipping, Order Notes, Bangladesh Fields, and Tools.
  • Enable/Disable any core checkout field.
  • Required/Optional toggle for every field.
  • Placeholder text for each field (admin configurable).
  • Drag-and-drop ordering (priorities update automatically).
  • State field control: manage billing_state and shipping_state like other fields.
  • Width control per field: Half (two columns) or Full (full width).
  • Bangladesh extras:
    • District dropdown (all 64 districts)
    • Sub-district (Upazila) dropdown (linked to district)
    • Show only when Country = Bangladesh (optional)
    • Validate against dataset (optional)
    • Allow custom Sub-district (optional)
  • Language Toggle: checkout form can switch English ⇄ Bangla instantly.
  • Self-healing fields: if another theme/plugin removes a core field (e.g. billing_phone), this plugin restores it when enabled.
  • Import/Export full settings as JSON.

📦 Installation

  1. Place in wp-content/plugins/abb-checkout-field-editor-bd
  2. Ensure the main plugin folder name is abb-checkout-field-editor-bd.
  3. Activate Woo Checkout Field Editor (Bangladesh Ready) from Plugins in wp-admin.
  4. Go to WooCommerce → Field Editor (BD).

Requirements:

  • WordPress 6.0+
  • WooCommerce 5.0+ (works with modern 7/8/9+ too)
  • PHP 7.4+ (PHP 8.x recommended)

🧭 Admin UI Overview

  • Billing Fields: Toggle/require, set placeholder, set width (Half/Full), drag to reorder.
  • Shipping Fields: Same controls as Billing.
  • Order Notes: Manage the order_comments field.
  • Bangladesh Fields:
    • Enable/disable the BD suite
    • Choose placement (Billing or Shipping)
    • Country condition (Always show / BD only)
    • District/Sub-district: enable, required, custom upazila, validate from list
    • Language toggle for checkout (English ⇄ Bangla)
  • Tools:
    • Export current settings (read-only JSON)
    • Import: paste JSON and save

🇧🇩 Bangladesh Dataset

  • File: assets/data/bd_geo_en.json (English)
  • File: assets/data/bd_geo_bn.json (Bangla)
  • Structure: a JSON map of "District": ["Upazila 1", "Upazila 2", ...].

You can update these files to adjust spellings or add missing upazilas. Validation and dropdowns automatically reflect your changes.


🧩 How it Works (Technical)

  • Hooks into woocommerce_checkout_fields to apply your toggles, labels, placeholders, required flags, priorities, and widths.
  • Widths use native Woo CSS classes:
    • Fullform-row-wide
    • Half → alternates form-row-first / form-row-last by priority order.
  • When enabled but missing (e.g., removed by theme), a field is recreated from a safe blueprint.
  • BD fields are injected into the chosen section (billing or shipping) with optional validation against the dataset.
  • Language toggle reloads the BD dataset (en or bn) instantly at checkout.

Primary option key: abb_wcfe_settings_v1 (array)
Language option key: abb_wcfe_lang (string: en or bn)


🧪 Troubleshooting

Phone field not showing

  • This plugin restores billing_phone if enabled in the admin.
  • If still hidden, a checkout customizer might be overriding later. Try increasing this plugin’s filter priority or temporarily disabling the conflicting plugin.

BD dropdowns not appearing

  • Check Bangladesh Fields → Enable BD fields.
  • If BD only is selected, ensure the chosen checkout country is Bangladesh (BD).
  • Confirm assets/data/bd_geo_en.json and assets/data/bd_geo_bn.json exist and are valid JSON.

Layout looks off

  • Some themes override Woo classes. Width logic uses form-row-first, form-row-last, form-row-wide.
  • Verify your theme supports these or add CSS to align.

🗺️ Roadmap

  • Preset layouts (Minimal / Standard / Full)
  • Conditional logic (show/hide based on field values)
  • Per-role field visibility
  • Import/export to file upload/download
  • Translations (i18n) & POT file

📝 Changelog

  • 1.4.0
    • Added English ⇄ Bangla toggle for checkout form
    • Added placeholder field support in admin + frontend
    • Security audit & text-domain fixes
    • Added Bangla dataset (bd_geo_bn.json)
  • 1.3.0
    • Field Width control (Half/Full)
    • Layout engine for 2-column rows by priority
  • 1.2.0
    • Split Billing and Shipping into separate tabs
    • Added State field controls
    • Deep-merge defaults so new fields appear on old installs
  • 1.1.0
    • Drag-and-drop ordering for core fields
  • 1.0.0
    • Initial release: enable/disable/require fields, BD district & sub-district, import/export

📄 License

This project is licensed under the GPL-2.0-or-later.

Read the full README on GitHub →