Hi @dziudek,
PayPal usually requires a unique invoice id for the order as by default, duplicate payments are prevented if the invoice id already exists.
So I’m not sure what you mean by disabling it entirely. There is also no setting in the plugin that directly impacts which information is shown in the PayPal emails.
The integration generates the invoice id by taking the invoice prefix and the WooCommerce order number.
If you are using a custom order number logic during the order creation, then this should also be respected by PayPal Payments.
But if you change the WooCommerce order number after the payment was completed, I don’t think the PayPal order could be patched further.
This filter provides access to the API request, and it allows you to modify which information is sent to PayPal, including the invoice id.
It should be possible to override the invoice ID to, for example, be empty with this filter, but then you would likely need to additionally enable duplicate payments in the PayPal account:
1. Login to your Business PalPal account (https://www.paypal.com/businessmanage/preferences/payments)
2. Go to the?Payments Preferences?section
3. Under the “Block accidental payments:” section, select the option “No, allow multiple payments per invoice ID”
This feature at PayPal prevents accidental double payments, but this would essentially block all payments if you send empty invoice ids.
I suggest additionally reaching out to the PayPal Support to ask if there is a way to remove this part from their emails.
Otherwise, we do not recommend removing the invoice id but instead suggest looking for a way to apply your custom order numbers during the order creation, so the correct number is sent to PayPal during the payment.
Kind regards,
Niklas