Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/amirrezashf/woocommerce-orders-payment-method-filter/archive/refs/heads/main.zipAdd a payment-method dropdown to the WooCommerce orders list for administrators.
Features
- Filter orders by payment gateway
- Restricted to users with
manage_options - Supports WooCommerce HPOS
- Supports legacy order storage
- Uses native WooCommerce order-query parameters
- Shows gateway title and ID
- No settings page
- Single-file plugin
Requirements
- PHP 7.4+
- WordPress 6.0+
- WooCommerce
Installation
- Download the repository as ZIP.
- Install it from Plugins → Add New Plugin → Upload Plugin.
- Activate the plugin.
- Open WooCommerce → Orders and use the payment-method filter.
Hooks
Change the required capability:
add_filter( 'wc_opmf_required_capability', static function () {
return 'manage_woocommerce';
} );
Modify gateways shown in the dropdown:
add_filter( 'wc_opmf_payment_gateways', static function ( $gateways ) {
return $gateways;
} );
Compatibility
The plugin supports both WooCommerce storage modes. HPOS filtering uses the native payment_method order-query argument; legacy storage filters the _payment_method order meta.
License
GPL-3.0
Author
Amirreza Shayesteh Far
- GitHub: https://github.com/amirrezashf
- Repository: https://github.com/amirrezashf/WooCommerce-Orders-Payment-Method-Filter
فیلتر سفارشهای ووکامرس بر اساس روش پرداخت
افزودن فیلتر روش پرداخت به لیست سفارشهای ووکامرس برای مدیران سایت.
قابلیتها
- فیلتر سفارش بر اساس درگاه پرداخت
- دسترسی فقط برای
manage_options - سازگار با HPOS
- سازگار با ساختار قدیمی سفارشها
- استفاده از Query استاندارد ووکامرس
- نمایش نام و شناسه درگاه
- بدون صفحه تنظیمات
- افزونه تکفایلی
پیشنیازها
- PHP 7.4+
- WordPress 6.0+
- WooCommerce
نصب
- Repository را بهصورت ZIP دانلود کنید.
- از افزونهها ← افزودن افزونه تازه ← بارگذاری افزونه نصب کنید.
- افزونه را فعال کنید.
- وارد ووکامرس ← سفارشها شوید.
هوکها
تغییر سطح دسترسی:
add_filter( 'wc_opmf_required_capability', static function () {
return 'manage_woocommerce';
} );
تغییر لیست درگاهها:
add_filter( 'wc_opmf_payment_gateways', static function ( $gateways ) {
return $gateways;
} );
سازگاری
در HPOS از پارامتر استاندارد payment_method استفاده میشود. در ساختار قدیمی، فیلتر روی متای _payment_method اعمال میشود.
مجوز
GPL-3.0
نویسنده
Amirreza Shayesteh Far