How To Add Invoice Prefix to WooCommerce PayPal Pro Payment Gateway to Solve Duplicate Invoice ID supplied Error
If you are using WooCommerce PayPal Pro Payment Gateway on multiple websites you might experience “Duplicate Invoice ID Supplied” error.
There are really two ways how you can solve that problem.
1st – Modify your PayPal settings (not the best option).
2nd – Add unique “invoice prefix” (best option).
Solve Duplicate Invoice ID supplied Error by changing your PayPal Settings
In order for you to be able to accept multiple payments for the same invoice you need to turn that setting on in your PayPal account.
To do so go to:
Account Settings

Payment Preferences

Click “Update” next to block payments

Select “No” under Block accidental payments: You may prevent accidental payments by blocking duplicate invoice IDs

Done! Now you can accept multiple payments for the same invoice.
Add unique “invoice prefix” (Better Option)
Now, the option that we suggest is adding a “unique invoice prefix” for each of the websites that you are using WooCommerce PayPal Pro Payment Gateway on.
To do so go to “Plugin Editor”: in your WordPress Admin Menu
- Select WooCommerce PayPal Pro from the dropdown
- Select the file woo-paypal-pro-gateway-class.php
- Scroll down to the follow line (line number around 406) that has the following
'INVNUM' => apply_filters( 'wcpprog_invnum_woo_order_number', $this->order->get_order_number() ), - And change it to the following:
'INVNUM' => "Your-Unique-Prefix-Here" . $this->order->get_order_number(), - IMPORTANT! DO NOT USE ANY SPACES OR SPECIAL CHARACTERS IN YOUR INVOICE PREFIX
Done! Now your invoice will have custom invoice prefix and you no longer should be getting Duplicate Invoice ID Error.
Let Us Help You Get More Customers:
From The Blog:
- Majority Of Branded Google Ad Campaigns are a Waste of Money
- How SEO Works in Bing: A Complete Guide to Ranking Higher
- What Is Semantic SEO: Our Complete Guide to Search’s Evolution
- SEO Synonyms: Your Content’s Secret Weapon
- How SEO and SEM Work Together?
- How Often Should You Update Your Website Content? What We’ve Learned From Years of Testing
- How Often Should You Blog for SEO? What We’ve Learned From Publishing 500+ Posts
- How Often Does Google Really Update Its Algorithm? Here’s What We’ve Learned
- What is Karma on Reddit and how to get it?
- Guide to Reddit Posting Schedules: Best Times and Days For Reddit Posts

