Skip to content

An offline payment gateway for WooCommerce that requests purchase order numbers.

Notifications You must be signed in to change notification settings

gazchap/gazchaps-woocommerce-purchase-order-payment-gateway

Repository files navigation

=== GazChap's WooCommerce Purchase Order Payment Gateway ===
Contributors: gazchap
Tags: woocommerce,ecommerce,gateway,purchase order,payment,offline,invoice
Requires at least: 4.2.0
Requires PHP: 5.3
Tested up to: 6.6.1
WC tested up to: 9.1.0
License: GNU General Public License v2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Stable tag: trunk
Donate link: https://paypal.me/gazchap

Adds a Purchase Order offline payment gateway to WooCommerce.

== Description ==
This plugin adds a new offline payment gateway to WooCommerce that allows your customers to request an invoice with a Purchase Order.

There are a number of options:

* You can set the plugin to ask the customer for a Purchase Order Number, and dictate whether this is mandatory or can be left blank.
* You can set the plugin to ask the customer for a postal address for the invoice.
* You can set the plugin to pre-fill this address with the customer's existing billing address (if they are logged in, and have one set in WooCommerce)
* You can set the plugin to add supplied Purchase Order information to order notification emails
* You can set the plugin to add supplied Purchase Order information to order objects in the WooCommerce REST API

When an order is received, the plugin will add all of the submitted information on to the WooCommerce View Order screen.

As of version 2.0, you can also add Purchase Order information to orders created through the WooCommerce Admin screens, and edit Purchase Order information saved against an existing order.

As of version 3.0, you can also add Purchase Order information to orders in the WooCommerce REST API. There are two settings to control this behaviour, allowing you to choose to add just the PO Number as well as the address if needed.
The two fields in the Order objects are `gazchap_purchase_order_number` and `gazchap_purchase_order_address` respectively.
The number is just a string, or `null` if no number was provided (or the payment method was not the Purchase Order gateway)
The address is an array of strings: `contact`, `company`, `address1`, `address2`, `city`, `county`, `postcode`. These fields can be null if not given.

Note: This plugin does not (currently, at least) generate the actual invoices - it is only used to collect the Purchase Order information.

== Requirements ==

[WooCommerce](https://woocommerce.com), at least version 3.0.

== Installation ==

Install via the WordPress Plugin Directory, or download a release from this repository and install as you would a normal WordPress plugin.

== Usage ==

Once installed and activated, you need to enable the Payment Gateway in *WooCommerce > Settings > Checkout* (or via the plugin's Settings link on the WordPress Plugins page) - you can then set the various options for the plugin at the same time.

== Changelog ==
= 3.2 (21/06/2023) =

* Code changes to fix meta data access and declare support for WooCommerce High Performance Order Storage. Thanks to benatherton for the information.

= 3.1 (24/05/2023) =

* Fixed a bug with the PO details being removed from the WooCommerce Order when the status (and other information) is updated via the admin screens. Thanks to adamalexanderw for the report.

= 3.0 (22/03/2022) =

* Added options to add PO details as separate fields to the WooCommerce REST API, enabled by default. Props to Darrin for the suggestion.

= 2.1 (09/04/2022) =

* Added language translation files for en-US and en-GB, primarily for correct spelling of "Organisation" in the United States. A .pot file is also included for other translators.

= 2.0 (26/03/2022) =

* Data submitted for the Purchase Order is now also stored in individual meta keys on the order, as well as in the original array format.
* The Purchase Order data (PO number, and address details if enabled) can now be edited/added for orders in the WooCommerce Admin screens - thanks to Bryson Sask at Key Innovations for the request.

= 1.1.5 (04/05/2021) =

* **Bugfix:** Fixed a PHP Notice being raised in the email_instructions() method - thanks to sharespring for the report.

= 1.1.4 (12/07/2020) =

* **Bugfix:** Fixed an incompatibility with some Persistent Checkout Data JavaScript in some themes - thanks to kylehenderson for the report.
* **Bugfix:** Fixed some deprecated code notices being generated by WooCommerce 3+
* **Bugfix:** Removed an odd duplicate "if" block that's crept in somehow!

= 1.1.3 (15/04/2019) =

* **Bugfix:** Payment method "description" is now shown during checkout. Thank you to pixelyzed for the bug report.

= 1.1.2 (24/02/2019) =

* Updated the notice shown if WooCommerce is deactivated to include the plugin name

= 1.1 (26/08/2018) =

* **Bugfix:** Purchase Order metadata is now saved to the order before emails are triggered to be sent.
* **New:** Setting to add the supplied Purchase Order Number to the email notifications
* **New:** Setting to add the supplied Purchase Order Address to the email notifications

= 1.0 (21/02/2018) =

* Initial release.

== License ==
Licensed under the [GNU General Public License v2.0](http://www.gnu.org/licenses/gpl-2.0.html)

About

An offline payment gateway for WooCommerce that requests purchase order numbers.

Resources

Stars

Watchers

Forks

Packages

No packages published