How to Make All Products on WooCommerce Simple Products: A Beginner’s Guide
Are you struggling with WooCommerce product types? Maybe you imported a bunch of products and they all came in as “variable” or “grouped” when you just want simple, straightforward products? Don’t worry, you’re not alone! This guide will walk you through how to efficiently convert all your products to simple products in WooCommerce. We’ll cover both manual and code-based methods, making it easy to choose the option that’s right for you.
Why Use Simple Products?
Before we dive into the “how,” let’s quickly touch on the “why.” Simple products are often the easiest to manage, especially when you sell items with:
- No variations: Think of a book, a single t-shirt (without sizes or colors), or a downloadable PDF.
- A fixed price: The price is always the same for each item.
- Basic inventory: You just want to track how many you have in stock.
- Easy to understand and implement.
- No coding required.
- Time-consuming for large product catalogs.
- Prone to human error if you have many products to update.
Imagine you’re selling hand-knitted scarves. If each scarf is unique (no sizes, colors, etc.) a simple product is perfect. If you offered the same scarf in different colors and lengths, you’d then need to use variable products to show the options in your catalog.
Using simple products when appropriate simplifies your store management, makes the buying process easier for your customers, and can even improve your website’s speed. A streamlined experience can really boost sales!
Method 1: Manually Changing Product Types
This method is suitable if you only have a small number of products to change. It’s the most straightforward and doesn’t require any coding.
Step-by-Step Guide:
1. Log in to your WordPress dashboard. Navigate to Products > All Products.
2. Find the product you want to change to a simple product.
3. Hover over the product and click the “Edit” link.

4. In the “Product data” meta box, you’ll see a dropdown menu labeled “Product type.”

5. Select “Simple product” from the dropdown.
6. Review and update any other product details like price, inventory, and description. Make sure the “General” tab is selected and add a price and inventory.
7. Click the “Update” button to save your changes.
Repeat these steps for each product you want to convert to a simple product.
Pros:
Cons:
Method 2: Using a Code Snippet to Convert All Products
This method is for users comfortable adding code snippets to their WordPress site. Always back up your website before making any code changes!
Important: This method converts *all* products to simple products. Double-check that this is what you really want before proceeding!
How to Add the Code Snippet:
There are several ways to add code snippets to your WordPress site:
1. Using the “Code Snippets” Plugin: This is the recommended method for beginners. Install and activate the “Code Snippets” plugin from the WordPress plugin repository. Then, add a new snippet with the following code:
<?php add_action( 'init', 'convert_all_to_simple_products' );
function convert_all_to_simple_products() {
$args = array(
‘post_type’ => ‘product’,
‘posts_per_page’ => -1, // Get all products
);
$products = new WP_Query( $args );
if ( $products->have_posts() ) {
while ( $products->have_posts() ) {
$products->the_post();
$product_id = get_the_ID();
// Update the product type to simple
update_post_meta( $product_id, ‘_product_type’, ‘simple’ );
// If variations exist, delete them
$product = wc_get_product( $product_id );
if ( $product->is_type( ‘variable’ ) ) {
$children_ids = $product->get_children();
foreach ( $children_ids as $child_id ) {
wp_delete_post( $child_id, true ); // true for force delete
}
}
}
wp_reset_postdata();
echo ‘
All products have been converted to simple products. Remember to deactivate the snippet!
‘;
} else {
echo ‘
No products found.
‘;
}
}
?>
Explanation:
- `add_action( ‘init’, ‘convert_all_to_simple_products’ );`: This hooks the `convert_all_to_simple_products` function to run during WordPress’s initialization.
- `$args`: Defines the query to retrieve all products.
- `WP_Query`: Performs the database query to get all products.
- `update_post_meta( $product_id, ‘_product_type’, ‘simple’ );`: This line is the magic! It updates the `_product_type` meta key for each product to “simple”.
- The additional code block checks if the product type is ‘variable’. If it is, it retrieves the child IDs (variations) and deletes them. This cleans up leftover variations if the product was previously a variable product.
- After the code successfully converted products, it will display a message at the top of your site.
- IMPORTANT: You must deactivate or delete the snippet after it runs to prevent it from running every time the site loads. Consider adding a conditional to the top of the function to prevent it from rerunning (check the `_product_type` and only update if it’s not already simple).
2. Adding to `functions.php` (Not Recommended for Beginners): You can add the code directly to your theme’s `functions.php` file. However, this is risky! A single typo can break your entire site. It’s strongly recommended to use Discover insights on Woocommerce How To Buy A Product For Someone Else the “Code Snippets” plugin instead. If you choose this method, back up your `functions.php` file first.
Steps to Using the Code Snippet:
1. Add the code snippet using your chosen method (ideally the “Code Snippets” plugin).
2. Activate the snippet.
3. Visit your website’s front end (any page will do). The code will run in the background. You should see the message “All products have been converted to simple products. Remember to deactivate the snippet!”
4. Immediately deactivate or delete the snippet! Leaving it active can cause problems.
Pros:
- Very fast for large product catalogs.
- Automates the process.
Cons:
- Requires some coding knowledge.
- Can be risky if not done carefully.
- Irreversible without a backup.
- Could result in data loss if not appropriately modified.
Important Considerations
- Backup: Always back up your website before making any significant changes, especially when using code snippets. This allows you to restore your site if something goes wrong.
- Variations: If you are converting variable products to simple products, any variations (e.g., different sizes or colors) will be lost. Make sure you are okay with this before proceeding.
- Testing: Before applying any changes to your live site, it’s best to test them on a staging environment. A staging environment is a copy of your website that you Explore this article on How To Re-Install Missing Woocommerce Shop Page can use for testing purposes.
- SEO: Deleting variations will change all of your URLS to the parent URL. Make sure you add redirects so you don’t get 404 errors in your web catalog.
Conclusion
Converting your WooCommerce products to simple products can streamline your store management and improve the customer experience. Choose the method that best suits your technical skills and the size of your product catalog. Remember to always back up your website and test any changes before applying them to your live site. Good luck!