[WordPress] 外掛分享: Sequential Order Numbers for WooCommerce

首頁外掛目錄 › Sequential Order Numbers for WooCommerce
WordPress 外掛 Sequential Order Numbers for WooCommerce 的封面圖片
10,000+
安裝啟用
★★★☆☆
3.8/5 分(29 則評價)
17 天前
最後更新
0%
問題解決
WordPress 5.6+ PHP 7.4+ v1.11.1 上架:2012-04-01

內容簡介

這個外掛可自動為新訂單設定連續訂單編號,並延伸了 WooCommerce 的功能。若在安裝時已存在現有訂單,連續訂單編號將從當前最高訂單編號開始。

這個外掛需要 WooCommerce 3.9.4 或更新的版本。

使用這個外掛不需要額外的設定,而且非常容易使用。啟用它後,訂單將自動連續編號。

如果您的商店裡沒有訂單,您的訂單編號將從 1 開始計數。如果您已有現有訂單,計數將從最高訂單編號繼續進行。

如果您曾經下過測試訂單,您必須將其刪除才能從「1」開始排序(刪除的訂單必須計算在內,以防它們被還原,因此它們必須完全消失)。

支援詳情

我們支援我們的免費外掛和擴充套件,但請理解我們更優先處理高級產品的支援。我們通常每隔幾天(通常每週最多延遲一周)檢查論壇。

Sequential Order Numbers Pro

如果您喜歡這個外掛,但希望能夠設定起始編號,或者添加自訂前綴 / 後綴到訂單編號中(例如,您希望像 WT101UK、WT102UK 等等),請考慮使用我們的 WooCommerce Sequential Order Numbers Pro 外掛,這個外掛在 WooCommerce Store 上可供購買。

更多詳情

請瀏覽產品頁面以查看完整詳情。
請查看專業版。
查看更多由 SkyVerge 開發的免費 WooCommerce 擴充套件
查看所有SkyVerge WooCommerce 擴充套件

有興趣做出貢獻嗎?您可以在GitHub 上找到這個專案,歡迎您的貢獻 🙂
如果您想讓您的付款網關與 Sequential Order Numbers 兼容,或其他可以篩選訂單編號的外掛,請進行一個小更改。在儲存訂單資料時,請將參考從 $order->id 變更為: $order->get_order_number()

這預設情況下與 WooCommerce 核心相容,因為訂單編號通常等於訂單 ID。然而,這也讓您與我們的外掛等相容,因為訂單編號可以被篩選(這就是我們使用它使其連續的方式),因此使用訂單編號是首選。

以下是一些其他的幫助開發人員的注意事項:

使用訂單編號取得訂單

如果您想要根據連續訂單編號來存取訂單,您可以使用下列輔助方法:

$order_id = wc_sequential_order_numbers()->find_order_by_order_number( $order_number );

這將提供您訂單的 ID(文章 ID),您可以根據此獲取訂單物件。

取得訂單編號

如果您可以存取訂單 ID 或訂單物件,您可以輕鬆使用 WooCommerce 核心函數依據連續訂單編號。

$order = wc_get_order( $order_id );
$order_number = $order->get_order_number();

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.11.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Sequential Order Numbers for WooCommerce」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin extends WooCommerce by automatically setting sequential order numbers for new orders. If there are existing orders at the time of installation, the sequential order numbers will start with the highest current order number.
This plugin requires WooCommerce 3.9.4 or newer.

No configuration needed! The plugin is so easy to use, there aren’t even any settings. Activate it, and orders will automatically become sequential.

If you have no orders in your store, your orders will begin counting from order number 1. If you have existing orders, the count will pick up from your highest order number.
If you’ve placed test orders, you must trash and permanently delete them to begin ordering at “1” (trashed orders have to be counted in case they’re restored, so they need to be gone completely).
Support Details
We do support our free plugins and extensions, but please understand that support for premium products takes priority. We typically check the forums every few days (usually with a maximum delay of one week).
Sequential Order Numbers Pro
If you like this plugin, but are looking for the ability to set the starting number, or to add a custom prefix/suffix to your order numbers (ie, you’d prefer something like WT101UK, WT102UK, etc) please consider our premium Sequential Order Numbers Pro for WooCommerce plugin, which is available in the WooCommerce Store.
More Details

See the product page for full details.
Check out the Pro Version.
View more of SkyVerge’s free WooCommerce extensions
View all SkyVerge WooCommerce extensions

Interested in contributing? You can find the project on GitHub and contributions are welcome 🙂
If you’d like to make your payment gateway compatible with Sequential Order Numbers, or other plugins that filter the order number, please make one small change. Instead of referencing $order->id when storing order data, reference: $order->get_order_number()
This is compatible with WooCommerce core by default, as the order number is typically equal to the order ID. However, this will also let you be compatible with plugins such as ours, as the order number can be filtered (which is what we do to make it sequential), so using order number is preferred.
Some other notes to help developers:
Get an order from order number
If you want to access the order based on the sequential order number, you can do so with a helper method:
$order_id = wc_sequential_order_numbers()->find_order_by_order_number( $order_number );

This will give you the order’s ID (post ID), and you can get the order object from this.
Get the order number
If you have access to the order ID or order object, you can easily get the sequential order number based on WooCommerce core functions.
$order = wc_get_order( $order_id );
$order_number = $order->get_order_number();

延伸相關外掛

文章
Filter
Apply Filters
Mastodon