Easily add general or item-specific detail inputs and file uploads to the WooCommerce checkout page.
Checkout Fields and File Upload for WooCommerce allows you to easily add custom fields to the WooCommerce checkout.
These fields can be configured only to appear when specific items or categories of items are in the cart or to appear for all items. When enabled, fields are added to the to the WooCommerce checkout field above the order notes field.
You can add custom input fields of a multitude of different types include text, multiline, date, password, number, file, and more!
Files are uploaded to a secure directory and are given a randomly generated name to prevent unauthorized access.
PHP 7.0 or greater is required (PHP 8.0 or greater is recommended)
- Upload the
fields-and-file-upload
folder to your plugin directory - Activate the plugin through the 'Plugins' menu in WordPress
Custom fields in the WooCommerce checkout.
Custom field responses on the order confirmation page.
The settings page to manage custom fields.
Composer is used to install dependencies. Once it is installed run composer install
to install them.
Tests are run with a installation of WordPress, WooCommerce, and the WordPress test tools. These can be installed with bin/install-wp-tests.sh [DATABASE NAME] [DATABASE USER] [DATABASE PASSWORD]
. This script requires Subversion to be installed. Once installed, run composer run tests
to run tests.
Run composer run phpcs
to run the code sniffer. Run composer run phpcs:full
for a full breakdown of what errors occurred and composer run phpcs:fix
to fix any auto-fixable errors.
README.md, readme.txt, and the comment of fields-and-file-upload.php are all generated by running bin/build-readme.sh
. This script requires Python and PIP to be installed. The data to populate these files is located in the data file readme-template.yml
and the script bin/build-readme.py
.
Run bin/build-zip.sh
to create a ZIP archive of the plugin that is suitable to be uploaded to a WordPress site.
Run bin/release-svn.sh
to create a release version and add it as a tag to SVN. Run bin/update-svn-assets.sh
to update wordpress.org assets only. You can specify your SVN username with "--username USERNAME".
Requires WP version 4.6 and PHP version 7.0.
- Allow fields to be displayed when the WooCommerce cart is undefined.
- Add spacing borders to the WooCommerce details page.
Made plugin labels on the admin dashboard more concise.
Only calculate allowed MIME types once.
Fixed an error on the settings page.
- Changed name to "Checkout Fields and File Upload for WooCommerce".
- Implemented changes recommended by the WordPress plugin review team.
- Permit custom file types.
- Fixed an issue with adding an item to an empty list on the settings page.
Default list settings to use an array.
Added file type filtering for uploads.
Corrected version numbers.
Cleanup plugin data during uninstall.
Initial release.