跳到内容

OrderCraft for WooCommerce

v1.2.1

roshandalvi · 2026年9月28日 上架

Generate realistic mock WooCommerce orders with random products, coupons, and shipping methods directly from the WordPress Admin Bar.

正在使用
10 以下
评分
暂无
累计下载
216
最近更新
2026年9月28日
需要 WordPress 5.8+已测试到 7.1.5PHP 7.4+

截图

The Admin Bar quick action button ( ⚡ + Test Order ).
The Admin Bar quick action button ( ⚡ + Test Order ).

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:

  1. Security & Permission Check: The plugin verifies user capabilities (manage_woocommerce) and validates the request nonce (check_admin_referer).
  2. Product Retrieval: Queries the database using wc_get_products() for 2 to 4 published products.
  3. Order Instantiation: Initializes a new order object via wc_create_order().
  4. Line Item & Quantity Assignment: Adds selected products with randomized quantities between 1 and 3.
  5. Customer Details: Populates standard test billing and shipping addresses.
  6. Shipping Selection: Instantiates a WC_Order_Item_Shipping object and attaches a randomly selected shipping rate.
  7. Coupon Application: Fetches an active coupon via get_posts('shop_coupon') or generates a fallback percentage coupon using WC_Coupon.
  8. Recalculation & Status: Runs $order->calculate_totals(), sets the status to processing, 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.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums