I have now upgraded to 2.4.1... however the issue is still there. Any ideas how to fix it?
I have now noticed that the error comes to old orders. New orders are working as expected.
Hopeful that anyone has an idea how to fix this issue.
Thanks for your help.
Okay, I found out that to change this I would need to change this to true:
protected $_canCapture = true;
Then to make it the default value:
<option selected value="not_capture"><?= $block->escapeHtml(...
I ended up using a combination of plugins.
First Magedelight Payment Restriction to restrict invoice to certain customers.
Then Magetrend PDF invoice to create a nicer invoice.
Then Fooman Emailattachments to attach the invoice PDF to the invoice email.
For Magento 2.3.5 you have to:
Create your own module in /app/code (example: Vendor/PdfInvoice )
Create a file in Vendor/PdfInvoice/registration.php
Create a file in Vendor/PdfInvoice/etc/di.xml
Create a file in Vendor/PdfInvoice/etc/module.xml
Override the section concerned without forgeting to mention in your di.xml
Disable cache ( bin/magento cache:...