Download the PHP package carloswph/wc-order-status without Composer
On this page you can find all versions of the php package carloswph/wc-order-status. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download carloswph/wc-order-status
More information about carloswph/wc-order-status
Files in carloswph/wc-order-status
Package wc-order-status
Short Description WooCommerce comprehensive helper for custom order statuses.
License GPL-3.0-or-later
Rated 4.00 based on 1 reviews
Informations about the package wc-order-status
wc-order-status
Adding custom order statuses to the Woocommerce platform could be definitely easier - and I am not talking about installing yet another plugin for dealing with silly tasks. This helper aims to automate and incept some intelligence to the way developers and web designers add, manage, style and even link behaviours and reactions to the custom statuses created.
First and foremost, we established a class to make the painful routine of adding custom statuses a single line of code.
Installation
No additional plugins, please. This library can be installed using Composer or, if you prefer, just download the main class OrderStatus
and add to your project.
Usage
By definition, for adding a new status to WC orders we first need to register such status in Wordpress, and then include the newly added status to the pool where order statuses are saved within Woocommerce. So... why not doing that at once, instead of successive functions and hooks? So let's see how to simply add new statuses:
Obs: any CSS predefined color name and HEX color will work, but also any other format accepted in CSS (rgb, rgba, hsl, hsla).
Todo
We are planning some new features shortly. With new statuses, sometimes we face the need of trigger or hook functions or actions to them. So it makes sense to generate a controller class where you can encapsulate any kind of desired behavior. Also, we expect to add:
- An easy way of customizing table actions and icons for new statuses
- Autogenerated email templates for them
- Support for Woocommerce Subscriptions