Description
OrderCraft for WooCommerce is a lightweight developer utility designed to streamline local development, agency QA workflows, transactional email design verification, and staging site testing.
Instead of filling out front-end checkout forms repeatedly, this plugin adds a dedicated quick-action button (⚡ + Test Order) to your top WordPress Admin Bar. With a single click, it programmatically generates a complete mock order using native WooCommerce CRUD APIs and redirects you straight to the WooCommerce order edit screen.
Key Features
- Instant Admin Bar Action: Create a test order in seconds from anywhere in the WP Admin dashboard.
- Multi-Item Selection: Randomly picks between 2 and 4 published products with varied quantities (1–3 items per product).
- Smart Coupon Engine: Applies an existing active store coupon or creates a temporary percentage discount coupon (
TEST10OFF–TEST25OFF) on the fly if no coupons exist. - Randomized Shipping Rates: Attaches realistic shipping line items (Standard Flat Rate, Express Delivery, Overnight Air, or Free Shipping Promo) with computed totals.
- Accurate Totals Calculation: Triggers
calculate_totals()to accurately factor line items, shipping fees, tax rates, and discount reductions into the final order amount. - Zero Front-End Friction: Bypasses cart pages, checkout forms, and real payment gateways by defaulting to Cash on Delivery (Test).
- Developer Focused: Built with clean, lightweight PHP using native WooCommerce CRUD classes (
wc_create_order(),WC_Order_Item_Shipping,WC_Coupon). Requires zero external assets or background processes.
How It Works
When you click the ⚡ + Test Order button in the Admin Bar:
- Security & Permission Check: The plugin verifies user capabilities (
manage_woocommerce) and validates the request nonce (check_admin_referer). - Product Retrieval: Queries the database using
wc_get_products()for 2 to 4 published products. - Order Instantiation: Initializes a new order object via
wc_create_order(). - Line Item & Quantity Assignment: Adds selected products with randomized quantities between 1 and 3.
- Customer Details: Populates standard test billing and shipping addresses.
- Shipping Selection: Instantiates a
WC_Order_Item_Shippingobject and attaches a randomly selected shipping rate. - Coupon Application: Fetches an active coupon via
get_posts('shop_coupon')or generates a fallback percentage coupon usingWC_Coupon. - Recalculation & Status: Runs
$order->calculate_totals(), sets the status toprocessing, and redirects directly to the edit order screen.
License & Copyright
OrderCraft for WooCommerce is open-source software licensed under the GNU General Public License v2.0 or later (GPLv2+).
- License: GPLv2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- Copyright: © 2026 Roshan Dalvi, Walstar Technologies, Pratap Vashi, Walstar Media.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Installation
- Upload the
ordercraft-woocommerceplugin directory to your/wp-content/plugins/directory. - Activate the plugin through the Plugins menu in WordPress.
- Ensure WooCommerce is installed and activated.
- Ensure your WooCommerce store has at least one published product.
- Click the ⚡ + Test Order button in the WordPress Admin Bar to generate a test order.
FAQ
-
Does OrderCraft process real payments or touch live gateways?
-
No. Test orders are generated programmatically via backend WooCommerce CRUD methods. All generated orders use “Cash on Delivery (Test)” as the payment method and do not invoke external payment gateways or process real financial transactions.
-
What happens if my store has no published products?
-
OrderCraft requires at least one published product to generate line items. If no published products exist, the order generation process halts safely and displays a dismissible error notice in your WordPress admin dashboard.
-
Can non-admin users generate test orders?
-
No. The Admin Bar button and execution endpoints are restricted exclusively to users with the
manage_woocommercecapability (Administrators and Shop Managers). Every request is also validated against a secure WordPress nonce. -
Will generating a test order trigger WooCommerce emails or webhooks?
-
Yes. Because OrderCraft uses native WooCommerce APIs to create and update order statuses to “Processing”, standard WooCommerce email notifications (such as “New Order”) and third-party webhooks tied to order creation hooks will trigger as normal. This makes OrderCraft an ideal utility for testing transactional emails, PDF invoices, and API webhooks.
-
Does OrderCraft support custom product types or variable products?
-
OrderCraft retrieves published products using
wc_get_products(). Simple products and parent variable products are fully supported. Line item prices are calculated based on the product’s regular or sale price configured in WooCommerce. -
Will this plugin leave orphan data in my database?
-
OrderCraft creates standard WooCommerce orders, coupons, and line items stored directly in the native WooCommerce order tables (
wp_wc_orders/wp_posts). When you delete generated test orders through the WooCommerce Orders screen, all associated line items and metadata are cleaned up automatically by WooCommerce. -
Is OrderCraft safe to keep active on a production store?
-
While OrderCraft is restricted to admin users via capability checks and nonces, it is designed primarily as a development, staging, and QA testing utility. We recommend activating it on development, local, or staging environments.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“OrderCraft for WooCommerce” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “OrderCraft for WooCommerce” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.2.1
- Renamed the plugin to OrderCraft for WooCommerce.
- Updated the plugin slug and text domain to match the new plugin identity.
- Added WooCommerce as a required plugin dependency header (
Requires Plugins: woocommerce).
1.2.0
- Added randomized shipping methods including Flat Rate, Express Delivery, Overnight Air Courier, and Free Shipping Promo.
- Added shipping cost calculations to generated orders.
1.1.0
- Added multi-item selection with 2–4 random published products per order.
- Added coupon handling using existing published coupons or generated test discount coupons.
1.0.0
- Initial release.

