Creating coupons one by one in WooCommerce can take a lot of time, especially when you need many unique codes for affiliates, email campaigns, customers, influencers, or seasonal promotions.
A WooCommerce coupon generator helps you bulk create coupons and generate coupon codes with shared settings such as discount type, amount, expiry date, usage limit, products, and customer restrictions. This makes campaign setup much faster and more consistent.
In this tutorial, you’ll learn how to use CBULKiT – Advanced Bulk Coupons for WooCommerce as an advanced bulk coupon generator for WooCommerce. We’ll show you how to create multiple coupon codes, apply coupon settings, and manage large coupon campaigns more efficiently.
WooCommerce generate coupon code programmatically
One of the simplest methods to generate coupon code WooCommerce is adding a PHP snippet to the WordPress backend.
To make this PHP snippet work, we recommend you take the below into consideration:
- Don’t use this method if you have no experience in code writing or working with function.php file.
- Back up your site before running this code.
- To make sure the basic information of your website remains unchanged, first create a child theme, then insert this code into function.php file.
- To trigger the function and make sure the coupons are generated, go to your WordPress admin URL with the “bb-gen-coupons” at the end like /wp-admin/admin.php?bb-gen-coupons.
- If you face any problems, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again.
Here, you can find the PHP code to bulk generate multi WooCommerce coupon code:
/**
* @snippet Bulk Generate Coupons @ WordPress Admin
* @how-to Get CustomizeWoo.com FREE
* @author Rodolfo Melogli
* @compatible WooCommerce 6
*/
add_action( 'admin_init', 'bbloomer_generate_coupons_admin' );
function bbloomer_generate_coupons_admin() {
if ( isset( $_REQUEST['bb-gen-coupons'] ) ) {
if ( ! current_user_can( 'manage_WooCommerce ' ) ) {
wp_die( 'You do not have permission to bulk generate coupons' );
}
$number_of_coupons = 100; // DEFINE BULK QUANTITY
for ( $i = 1; $i <= $number_of_coupons; $i++ ) {
$coupon = new WC_Coupon(); $random_code = bin2hex( random_bytes( 8 ) ); // 16 CHARS PHP 7+ ONLY
if ( wc_get_coupon_id_by_code( $random_code ) ) continue; // SKIP IF CODE EXISTS
$coupon->set_code( $random_code );
$coupon->set_description( 'Coupon generated programmatically ('. $i. '/'. $number_of_coupons. ')' );
$coupon->set_discount_type( 'percent' );
$coupon->set_amount( 20 );
$coupon->set_minimum_amount( 1 );
$coupon->set_individual_use( true );
$coupon->set_product_categories( array( 54, 55 ) );
$coupon->set_usage_limit_per_user( 1 );
$coupon->save();
}
}
}
After running this code, 100 coupons will be generated successfully on your WordPress site as illustrated below:

If you need to bulk generate more or fewer coupons, change the number in front of $number_of_coupons – highlighted in yellow.
Use WooCommerce coupons bulk edit plugin as WooCommerce bulk coupon generator
Using the WooCommerce coupons bulk edit plugin enables you to create bulk WooCommerce coupons. You can create as many identical coupon codes as you need, all of which will apply the same discount to your customers. Even better, you can bulk edit coupons after creating them.
Most WooCommerce coupon code generators only allow you to generate new coupons. While the WooCommerce coupons bulk editing plugin has a Duplicate tool. With this tool, you can clone as many existing coupons as you need.
Also, if you want unique WooCommerce discount codes for the created coupons, you can use the plugin because it will automatically generate a unique WooCommerce code for each coupon.
In the following, we will show you how to generate coupons in bulk using the coupon generator for the WooCommerce tool.
Step 1: Install WooCommerce coupons bulk edit plugin
By downloading and installing the WooCommerce coupons bulk editing plugin on your website, you have access to all tools required to bulk generate and bulk edit multi WooCommerce coupon code.
Read more: How to install the CBULKiT – Advanced Bulk Coupons for WooCommerce?
To use this bulk coupon generator WooCommerce navigate to the below Address:
WordPress Dashboard > iT Bulk Editing > Woo Coupons

On this page, you can find a comprehensive toolbar and a list of all coupons in a table. In the Toolbar designed on top of the table, there are two helpful tools for WooCommerce generate coupon code, which are:
- New wooCommerce coupon generator
- WooCommerce coupon duplicator
Now, let’s see how these tools help you to WooCommerce create coupon codes.
CBULKiT – Advanced Bulk Coupons for WooCommerce plugin by ithemeland
The easy way to bulk generate coupon codes in WooCommerce

Step 2: Generate coupon code WooCommerce
In WooCommerce coupons bulk editing plugin, you can use one of the below methods to bulk generate coupon code WooCommerce :
Read the following step by step guide to get familiar with both methods.
Method #1: WooCommerce bulk generate new coupons
If you need to use random coupon code generator WooCommerce for bulk creating new coupons, try to:
- Press the New coupon generator icon in the toolbar.

- In the prompted pop-up, write the number of coupons you want to bulk generate. For example, we decided to generate 10 new coupons.
- Press the Create button.

That’s it. The WooCommerce bulk generated coupons have been done successfully.

After generating new coupons, you need to edit some features like discount type, discount amount, products, etc.
In the WooCommerce coupons bulk editing plugin, there are three methods for making changes on different fields of coupons including:
- Inline editing: Edit one field of a single WooCommerce coupon directly in the table.
- Bind editing: Edit one field of multiple WooCommerce coupons in the table.
- Bulk editing: Edit multiple fields of multiple WooCommerce coupons.
Let’s try to change some coupon fields with these methods.
Inline edit discount type of coupon
After bulk generating coupons, all of them have the same discount type. To change this field by inline edit, follow the below steps:
- Press the Column Manager icon from toolbar to open the Column Manager form.

- In this form mark Discount type and press the Apply to table button.

- Open the dropdown list of Discount types related to one of the coupons.
- Choose one of the Discount Types from the list.

Bind edit products assigned to the WooCommerce coupon
By following the below steps, you can bind edit products assigned to multiple WooCommerce coupons:
- Add products column to the table by marking the field in the Column manager form.
- Select some coupons in the table (1).
- Press Bind Edit icon in the toolbar (2).
- Click on the Products field related to one of the selected coupons (3).

- In the displayed pop up, choose the products you want to be assigned to these coupons from the list then press Save Changes.

Wait a few seconds and the WooCommerce bulk coupon generator will make changes appropriately.
Method #2: Duplicate coupons to WooCommerce create coupon code
Duplicating coupons is the next method for creating new coupons in this coupon code generator WooCommerce plugin.
To clone some existing coupons, first, try to filter the coupons you want to duplicate
In the WooCommerce coupons bulk edit plugin, a comprehensive Filter Form supporting all WooCommerce coupon fields. To open this form, press the first icon in the toolbar. Then set your desired filters in different fields and finally press Get Coupons to see the filtered coupons in the table.
For example, if you want to filter coupons with Percentage discount type, you can choose this option from the list of Discount types in the filter form as illustrated below:

Then by clicking on Get Coupons button, all WooCommerce coupons with Percentage Discount type will be displayed in the table.
Now, you are ready to duplicate them by following the below steps:
- Mark some WooCommerce coupons on the table.
- Press the Duplicate icon in the toolbar.

- Write how many times you want to duplicate the WooCommerce coupons. For example, we tried to duplicate the coupons 3 times.

- Press the Start duplicate button.
Your task has been done successfully. As you may notice in the below picture, all selected coupons are duplicated 3 times:

Now, let’s see how you can bulk edit some fields of the bulk generated coupons
Bulk edit WooCommerce coupon amount field
Suppose that you want to set the Coupon Amount of all bulk generated coupons to 20. To make this happen, follow the below instructions:
- Mark WooCommerce coupons in the table.
- Click on the Bulk Edit icon in the toolbar to open the bulk edit form.

- In the General tab of the Bulk Edit form, find the Coupon Amount field.
- Open the Operator list and choose Set New.
- Write 20 in the text box.
- Press the Do Bulk Edit button.

As shown below, all Coupon Amount have been changed successfully as we expected.

CBULKiT – Advanced Bulk Coupons for WooCommerce plugin by ithemeland
The easy way to bulk generate coupon codes in WooCommerce

Why do you need to bulk generate multi WooCommerce coupon codes?
If you set up an online store with WooCommerce and want to generate multiple coupons to offer to customers, WooCommerce bulk coupons will save you a lot of time!
Store managers need to generate a large number of coupons for several important reasons.
The first reason is the ability to evaluate the performance of various marketing campaigns. One of the biggest disadvantages of using a single code for multiple users and marketing campaigns is that you can’t be sure which one exactly encouraged the customers and motivated them to buy. For example, if you use the same coupon code on both your Instagram marketing and email marketing, how can you determine which method has a better performance?
The second reason for using multiple coupons is to assign them to different customers. This way, you can check which coupons are the most used, how many customers are using them, and when they are using the discounts.
Many online store managers only use a few limited coupon codes just because it takes a lot of time to create coupons in WooCommerce, and this mistake makes them unable to plan their marketing strategies.
But there is a simple solution to this problem. WooCommerce bulk coupon generator plugin is an ideal way to create WooCommerce bulk coupons and use them in any way you want. For example, you can create random coupon codes and use each one for a separate marketing campaign.
Conclusion
A WooCommerce coupon generator is useful when your store needs many codes for different customers, campaigns, or marketing channels. Instead of repeating the same coupon setup manually, you can generate codes in bulk and keep settings consistent.
Bulk coupon generation is especially helpful for email campaigns, loyalty rewards, referral offers, influencer promotions, event discounts, and personalized coupon campaigns.
With CBULKiT – Advanced Bulk Coupons for WooCommerce, you can create coupon codes in bulk, manage coupon settings, filter coupon lists, and update generated coupons faster. This gives store owners a more organized way to run coupon-based promotions.
FAQ
1. What is a WooCommerce coupon generator?
A WooCommerce coupon generator is a tool that creates multiple coupon codes automatically instead of requiring you to add each coupon manually.
2. Can I bulk create coupons in WooCommerce?
WooCommerce does not provide strong built-in bulk coupon creation, but CBULKiT – Advanced Bulk Coupons for WooCommerce can help generate and manage multiple coupons.
3. What is a bulk coupon generator plugin?
A bulk coupon generator plugin lets you create many coupon codes with shared settings such as discount type, amount, expiry date, and usage restrictions.
4. When should I generate coupon codes in bulk?
Bulk coupon generation is useful for email campaigns, customer rewards, influencer promotions, referral programs, holiday sales, and personalized discounts.
5. Can I set expiry dates for generated coupons?
Yes. You can apply expiry dates to coupon codes so they only work during the intended campaign period.
6. Can I create unique coupon codes for customers?
Yes. Unique coupon codes can be generated for different customers or campaign segments to improve tracking and control.