yireo / magento2-auto-invoice-zero-subtotal-orders
Automatically invoice orders placed with the free payment method and a zero grand total
Package info
github.com/yireo/Yireo_AutoInvoiceZeroSubtotalOrders
Type:magento2-module
pkg:composer/yireo/magento2-auto-invoice-zero-subtotal-orders
Requires
- php: >=8.1
- magento/framework: ^103.0
- magento/module-backend: ^102.0
- magento/module-config: ^101.0
- magento/module-payment: ^100.0
- magento/module-sales: ^103.0
- magento/module-store: ^101.0
- psr/log: ^1.0 || ^2.0 || ^3.0
Requires (Dev)
- phpunit/phpunit: ^9.5 || ^10.5
- yireo/magento2-integration-test-helper: ~0.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-28 21:07:02 UTC
README
The option "Payment Methods > Zero Subtotal Checkout > Automatically Invoice All Items" (payment/free/payment_action) was removed in 2.4.0. This module brings back the automatic invoicing of free orders via cron.
Installation
composer require yireo/magento2-auto-invoice-zero-subtotal-orders bin/magento module:enable Yireo_AutoInvoiceZeroSubtotalOrders
Configuration
The module is disabled by default. Enable it under Stores > Configuration > Yireo > Yireo Auto Invoice Zero Subtotal Orders (yireo_auto_invoice_zero_subtotal_orders/general/enabled), per store view if needed.
How it works
Every 5 minutes, a cron job looks for orders that:
- were placed with the payment method No Payment Information Required (
free); - have a grand total of zero;
- have the state
newand the order status configured under Zero Subtotal Checkout > New Order Status (payment/free/order_status); - can still be invoiced (not on hold, not in payment review, not canceled).
These orders are invoiced offline. Results and errors are logged to var/log/yireo_auto_invoice_zero_subtotal_orders.log.