Code Monkey home page Code Monkey logo

fields-and-file-upload's Introduction

Checkout Fields and File Upload for WooCommerce

Easily add general or item-specific detail inputs and file uploads to the WooCommerce checkout page.

Description

Checkout Fields and File Upload for WooCommerce allows you to easily add custom fields to the WooCommerce checkout.

Product-Specific Fields

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.

Multiple Input Types

You can add custom input fields of a multitude of different types include text, multiline, date, password, number, file, and more!

Secure File Uploads

Files are uploaded to a secure directory and are given a randomly generated name to prevent unauthorized access.

Installation

PHP 7.0 or greater is required (PHP 8.0 or greater is recommended)

  1. Upload the fields-and-file-upload folder to your plugin directory
  2. Activate the plugin through the 'Plugins' menu in WordPress

Screenshots

Custom fields in the WooCommerce checkout.
Custom fields in the WooCommerce checkout.

Custom field responses on the order confirmation page.
Custom field responses on the order confirmation page.

The settings page to manage custom fields.
The settings page to manage custom fields.

Developing

Installing dependencies

Composer is used to install dependencies. Once it is installed run composer install to install them.

Running tests

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.

Code sniffing

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.

Generating readme

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.

Creating ZIP archive

Run bin/build-zip.sh to create a ZIP archive of the plugin that is suitable to be uploaded to a WordPress site.

Publishing to wordpress.org

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".

Compatibility

Requires WP version 4.6 and PHP version 7.0.

Changelog

1.1.7

  • Allow fields to be displayed when the WooCommerce cart is undefined.
  • Add spacing borders to the WooCommerce details page.

1.1.6

Made plugin labels on the admin dashboard more concise.

1.1.5

Only calculate allowed MIME types once.

1.1.4

Fixed an error on the settings page.

1.1.3

  • Changed name to "Checkout Fields and File Upload for WooCommerce".
  • Implemented changes recommended by the WordPress plugin review team.

1.1.2

  • Permit custom file types.
  • Fixed an issue with adding an item to an empty list on the settings page.

1.1.1

Default list settings to use an array.

1.1.0

Added file type filtering for uploads.

1.0.2

Corrected version numbers.

1.0.1

Cleanup plugin data during uninstall.

1.0.0

Initial release.

fields-and-file-upload's People

Contributors

brandonxlf avatar

Watchers

 avatar

fields-and-file-upload's Issues

Uploaded file assignment

Hello,
thank you for this good working and easy to setup product.
But I have a problem with it. Where do i know which uploaded file is assigned to which order?
Since every uploaded file gets a random name and I cant see the attached file in the orders menü of woocommerce its really hard to tell what file belongs to what order.
Is there anything that can be changed, so that atleast the order number is part of the random generated file name?
Or is there any other methode?

Thanks.

Change max. upload size to any other value

Hello,

it would be nice to have a option to change the max. upload file size to any value. Now its limited to 40mb. But in my case some files are like 100mb or even more.
I coudnt find anything in the installations files to change the value.

File delete button

It would be nice to have a delete button for the selected files in the upload area. When for example someone choose the wrong file.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.