WooCommerce Processing Status Confirmation
WooCommerce admin plugin that requires exact confirmation before setting an order status to processing.
by Amirreza Shayesteh Far · github.com/amirrezashf/woocommerce-processing-status-confirmation · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/amirrezashf/woocommerce-processing-status-confirmation/archive/refs/heads/main.zipReadme
WooCommerce Processing Status Confirmation
Requires an exact admin confirmation before changing a WooCommerce order status to processing.
Description
WooCommerce Processing Status Confirmation adds a confirmation modal to the WooCommerce admin order edit screen.
When an admin or store manager tries to change an order status to processing, the plugin asks them to type the exact phrase:
بله
The confirmation is also validated server-side using a nonce and submitted form fields.
Features
- Confirmation modal before setting order status to processing
- Requires exact phrase confirmation
- Server-side validation
- Nonce verification
- Works on WooCommerce admin order edit screens
- Supports classic order storage
- Includes HPOS-compatible object save handling
- No AJAX dependency
- No custom database tables
- No permanent data storage
- Single-file plugin
Requirements
- PHP 7.4+
- WordPress 6.0+
- WooCommerce 7.0+
Installation
- Create a folder named
woocommerce-processing-status-confirmation. - Place
woocommerce-processing-status-confirmation.phpinside it. - Upload the folder to:
wp-content/plugins/
- Activate the plugin from WordPress admin.
Usage / How it Works
- Open a WooCommerce order in the admin panel.
- Change the order status to
Processing. - A confirmation modal appears.
- Type exactly:
بله
- Confirm and update the order.
If the confirmation is missing or invalid, the status change is blocked and the order status is reverted.
Data Storage
The plugin does not store order data or confirmation logs.
It only uses a short-lived transient to display an admin notice when a status change is blocked.
Development
Built with:
- WordPress Coding Standards
- Native WordPress APIs
- WooCommerce order hooks
- Nonce verification
- Capability checks
- Escaped admin output
- Translation-ready strings
- HPOS-compatible architecture
Hooks
admin_enqueue_scriptswp_insert_post_datawoocommerce_before_order_object_saveadmin_notices
Filters
wc_psc_required_capability
Change the required capability.
Default:
edit_shop_orders
Example:
add_filter(
'wc_psc_required_capability',
static function () {
return 'manage_woocommerce';
}
);
wc_psc_is_order_edit_screen
Customize screen detection for loading the confirmation UI.
wc_psc_is_order_save_request
Customize request detection for server-side confirmation enforcement.
Future Improvements
- Admin settings page
- Custom confirmation phrase
- Role-based bypass option
License
GPL-2.0-or-later
Author
Amirreza Shayesteh Far
GitHub: https://github.com/amirrezashf
تأیید تغییر وضعیت سفارش ووکامرس
افزونهای سبک برای ووکامرس که قبل از تغییر وضعیت سفارش به «در حال انجام»، تأیید دقیق مدیر را الزامی میکند.
توضیحات
افزونه WooCommerce Processing Status Confirmation در صفحه ویرایش سفارش ووکامرس یک modal تأیید نمایش میدهد.
زمانی که مدیر یا مدیر فروشگاه بخواهد وضعیت سفارش را به processing تغییر دهد، باید دقیقاً عبارت زیر را وارد کند:
بله
این تأیید در سمت سرور نیز با nonce و فیلدهای فرم بررسی میشود.
ویژگیها
- نمایش modal تأیید قبل از تغییر وضعیت به processing
- نیاز به وارد کردن عبارت دقیق
- اعتبارسنجی سمت سرور
- بررسی nonce
- اجرا در صفحه ویرایش سفارش ووکامرس
- پشتیبانی از ساختار کلاسیک سفارشها
- مدیریت سازگار با HPOS
- بدون وابستگی به AJAX
- بدون جدول اختصاصی دیتابیس
- بدون ذخیرهسازی دائمی داده
- معماری تکفایلی
نیازمندیها
- PHP 7.4+
- WordPress 6.0+
- WooCommerce 7.0+
نصب
- یک پوشه با نام
woocommerce-processing-status-confirmationبسازید. - فایل
woocommerce-processing-status-confirmation.phpرا داخل آن قرار دهید. - پوشه را در مسیر زیر آپلود کنید:
wp-content/plugins/
- افزونه را از پنل مدیریت وردپرس فعال کنید.
نحوه استفاده / عملکرد افزونه
- وارد صفحه ویرایش سفارش ووکامرس شوید.
- وضعیت سفارش را روی
Processingقرار دهید. - پنجره تأیید نمایش داده میشود.
- دقیقاً عبارت زیر را وارد کنید:
بله
- تأیید کنید و سفارش را بهروزرسانی کنید.
اگر تأیید انجام نشود یا معتبر نباشد، تغییر وضعیت block میشود و سفارش به وضعیت قبلی برمیگردد.
ذخیرهسازی داده
افزونه هیچ دادهای از سفارش یا تأییدها ذخیره نمیکند.
فقط برای نمایش notice مدیریتی، از یک transient کوتاهمدت استفاده میشود.
توسعه
توسعه دادهشده بر اساس:
- WordPress Coding Standards
- Native WordPress APIs
- WooCommerce order hooks
- بررسی nonce
- بررسی capability
- خروجیهای escape شده
- متنهای آماده ترجمه
- معماری سازگار با HPOS
هوکها
admin_enqueue_scriptswp_insert_post_datawoocommerce_before_order_object_saveadmin_notices
فیلترها
wc_psc_required_capability
تغییر capability مورد نیاز.
مقدار پیشفرض:
edit_shop_orders
نمونه استفاده:
add_filter(
'wc_psc_required_capability',
static function () {
return 'manage_woocommerce';
}
);
wc_psc_is_order_edit_screen
برای تغییر منطق تشخیص صفحه ویرایش سفارش.
wc_psc_is_order_save_request
برای تغییر منطق تشخیص request ذخیره سفارش.
بهبودهای آینده
- صفحه تنظیمات
- تغییر عبارت تأیید از پنل مدیریت
- امکان bypass بر اساس نقش کاربری
مجوز
GPL-2.0-or-later
نویسنده
Amirreza Shayesteh Far
GitHub: https://github.com/amirrezashf