Blog

2 easy ways to bulk edit product custom field in WooCommerce

Bulk edit product custom field
Table of Contents

For store managers, the lack of a powerful tool for bulk edit product custom field is a major problem. They have to visit each product’s page to see the meta fields and manually edit each field separately. This is a more challenging task when there are a large number of products in the online shop with various meta fields that need to be edited regularly.

To help you easily edit your custom fields in bulk, in this post, we are going to introduce the following methods:

Continue reading to learn how you can use these methods to bulk edit product custom fields in WooCommerce very fast and easily.

What is a custom field and how you can create it?

WooCommerce custom fields include any type of field such as the following:

  • Text field
  • Text area
  • Drop-down / field selection
  • Radio buttons
  • Selection boxes
  • file upload
  • Date fields
  • Etc.

These fields are displayed on the product page next to the add to cart button, giving customers more information about each product or letting them upload or insert some information.

To add custom fields in WordPress without a plugin, go to the Screen options section and mark the Custom field checkbox. Doing this will add the corresponding meta box at the bottom of the page.

add custom fields in WordPress without plugin

Then you need to specify the Name and Value and click the Add Custom Field button.

select name and value for custom field in WordPress

Of course, there are various plugins such as ACF that you can use to do this task with more flexible options.

When the number of products and custom fields you created is large and you want to edit several products at the same time, you need a bulk edit plugin that supports meta fields and is compatible with different plugins you added custom fields with.

You can also add the Custom Field option to the WooCommerce default editor with the help of coding so that you can bulk edit them without a plugin.

 In the following, we will show you how to use these two methods to bulk edit product meta fields WooCommerce.

Add meta field to the WooCommerce default editor by coding

If you have already worked with the default editor of WooCommerce, you know that there is no item for bulk editing the custom field in this form. However, you can add this feature by using two hooks:

  • The first hook to display the custom field in the editor.
  • The second hook to save and store value in WooCommerce.

You need to insert these hooks in the functions.php file of your WordPress theme.

Although, we have some recommendations for you before copy/paste the below code in the Functions.php:

  1. Use this code only if you are an expert in code writing. Otherwise, please ask an expert to do this task.
  2. It is a good idea to back up your site before inserting the code
  3. It makes sense if you create a child theme and then insert the below code in the Functions.php of the new child theme
/**
 * @snippet       Custom field bulk edit - WooCommerce
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 4.0
 * @community     https://businessbloomer.com/club/
 */
 // Note: change all occurrences of "custom_field" with the key of your custom field
 add_action( 'WooCommerce_product_bulk_edit_start', 'bbloomer_custom_field_bulk_edit_input' );   
 function bbloomer_custom_field_bulk_edit_input() { ?>
    <div class="inline-edit-group">
      <label class="alignleft">
         <span class="title"><?php _e( 'Custom Field', 'WooCommerce' ); ?></span>
         <span class="input-text-wrap">
            <input type="text" name="custom_field" class="text" value="">
         </span>
        </label>
    </div>
    <?php
}
 
add_action( 'WooCommerce_product_bulk_edit_save', 'bbloomer_custom_field_bulk_edit_save' );
function bbloomer_custom_field_bulk_edit_save( $product ) {
    $post_id = $product->get_id();   
   if ( isset( $_REQUEST['custom_field'] ) ) {
        $custom_field = $_REQUEST['custom_field'];
        update_post_meta( $post_id, 'custom_field', wc_clean( $custom_field ) );
    }
}

When you insert and run the code successfully, go to the below address and open the default editor of WooComemrce to see the result:

WordPress Admin > Products > Bulk Edit

Add meta field to the WooCommerce Default Editor by coding

For store managers who are not familiar with code writing or for those who expect to have access to a more flexible tool allowing them to filter products based on custom fields or bulk edit them conveniently, we are going to introduce a wonderful product meta fields bulk editor. 

Bulk edit product custom field using WooCommerce products bulk Edit plugin

WooCommerce product bulk edit plugin is one of the best product meta fields bulk editors WooCommerce provides useful tools for group editing of products to store managers. Editing individual custom fields and other product specifications is a very time-consuming task, so for big and small stores, this plugin will help site managers save time.

In this plugin, in addition to the possibility of bulk editing of meta fields, there is simultaneous editing of categories, regular and sale prices, short descriptions, stock, tax, shipping class, and many other things for several products.

By using this plugin, you will be able to add multiple fields such as text, password, email, numbers, data vector, selection, multiple selection, control boxes, radio buttons, and file uploads with different functions in the form filter and block edit. Create a form and use them according to your needs. Compatibility with other WooCommerce plugins such as ACF is one of the other features of this plugin.

Let’s review a step-by-step guide for bulk editing custom fields with this plugin.

Step 1: Install product meta fields bulk editor 

You can download and install this popular meta fields bulk editor product on your WordPress website. After activating the plugin, go to the following address to open the main page of the plugin:

WordPress Dashboard > iT Bulk Editing > Woo Products

select Woo Products section in iT Bulk Editing menu
WooCommerce product bulk edit plugin

On this page, a list of all WooCommerce products is displayed in a table with a comprehensive toolbar on the top including the most useful tools you need for filtering and bulk editing all WooCommerce fields and meta fields. 

WooCommerce products list

Let’s review the tools and options provided in this plugin for product custom field bulk edit WooCommerce.

Step 2: Add custom fields to product meta fields bulk editor WooCommerce

To bulk edit custom meta fields such as text, number, confirmation checkbox, and date in this plugin, you must first click on the Custom Fields option on the toolbar to open the corresponding form:

select custom field option in WooCommerce toolbar

In this form, there are three methods available for adding or importing custom fields:

Method 1: Add WooCommerce product custom fields Manually

To add WooCommerce meta fields manually, try the below steps:

  1. Write the custom field Name in the text box of the Manually field and press the + button.
  2. In the right panel, write a name for the custom field. This name will be displayed in the bulk edit form or filter form of the plugin.
  3. Choose the custom field type from the list including:
  • Text Input 
  • Text Area
  • Checkbox
  • Radio
  • Array
  • Calendar
  • Email
  • Password
  • URL
  • Image
  • File
  • Editor
  • Select

We completely described all types of custom fields and the way you can customize them, here.

  1. Set the Value type of the meta field. This item will be changed based on the custom field you have chosen. 
add custom fields manually in meta fields form

By following these 4 steps, you can add as many custom fields as you need. Please, note that you have to add meta fields that are already added to the WooCommerce products. It is not possible to add a new meta field to WooCommerce products bulk editing plugin.

Method 2: Import WooCommerce meta fields automatically from the product

The next method is importing custom fields from one of the WooCommerce products automatically. To do this, you need to:

  1. Write the product ID in the box.
  2. Press the + button.

That’s it. The plugin will automatically import all meta fields related to the product and you can see a list of them in the right panel.

It is possible to set a new Name, choose Custom Field Type, and set Value type just like the previous method. 

Import meta fields Automatically from the product in meta fields form

Method 3: Import custom fields from other plugins

The third method allows you to import metadata from a third-party plugin like ACF. If you have already added some custom fields to WooCommerce by using the ACF plugin, you can open the dropdown list of Select box and choose them from the list then press the + button to see it in the right panel.

Import custom fields from other plugins in meta fields form

After adding and customizing the meta fields, press Save Fields to instruct the plugin to show them in the filter form, bulk edit form, and column profile form.

select save fields button in meta fields form

Now, let’s see how you can bulk edit product meta fields WooCommerce in the plugin.

Step 3: Change custom fields of multiple WooCommerce products 

As one of the best product meta fields bulk editor, our plugin fully supports bulk editing all types of custom fields. Also, the ability to filter products based on custom fields is another feature of the plugin.

For product custom field bulk edit WooCommerce, you can use one of the following two methods:

Method 1: Bulk edit product meta fields WooCommerce

To bulk change custom fields, you can:

  1. Filter some products using WooCommerce product bulk edit filter form.
  2. Select some products in the table.
  3. Open the Bulk edit form.
  4. Go to the Custom Fields tab.
  5. Make the changes you need.
  6. Press the Do Bulk Edit button.
Bulk edit product meta fields WooCommerce

Method 2: Bind edit product custom field WooCommerce

Bind edit is a quick way to allow you to make changes on custom fields of multiple products directly in the table. 

To do this, follow the below steps:

  1. Open the Column Profile form and mark the meta fields you want to bind edit to add the columns to the table.
Bind Edit product custom field WooCommerce
  1. Press the Apply to the Table button.
  2. Mark some products in the table and press the Bind Edit tool.
  3. Make changes you need on the custom filed cell of one of the selected products. 
select Bind Edit icon in WooCommerce toolbar
  • Press the Enter key.

After a few seconds, the plugin will change the meta fields of all selected products as illustrated below:

result branch code field in WooCommerce products list

How to add custom product fields in WooCommerce?

Suppose you want to let WooCommerce add extra fields to the product. In that case, enabling the custom field option is necessary, and then assigning a name and value to add particular information to the product page. Let’s review how you can add WooCommerce custom fields with and without a plugin.

WooCommerce add custom fields to products without a plugin

By following the below instructions, you can add WooCommerce product custom fields without the plugin:

  • Log in to the WordPress admin area.
  • Open one product page.
WooCommerce add custom fields to products without a plugin
  • Expand Screen Options and mark Custom Fields.
  • Collapse Screen Options and scroll down the page to see the custom fields box.
  • In this box, two fields need to be set: Name (e.g. Brand) and Value (e.g. H&M)
  • After filling in the custom field Name and Value fields, press the Add Custom Field button
Filling in custom field Name and Value fields and press Add Custom Field button in WooCommerce

Use the ACF plugin to create custom fields in WooCommerce products

Advanced custom fields (ACF) is one of the most popular WooCommerce custom fields plugins that supports 30 custom field types allowing you to add custom fields to WooCommerce products with few clicks.

Advanced custom fields (ACF) plugin

You can easily download the plugin from WordPress respiratory and install it on the website.

Install advanced custom fields (ACF) plugin in WooCommerce

After installing and activation, you’ll see a new Custom Fields tab appear in your dashboard. Press the option to see the Field Groups page.

Select Field Groups page in custom fields menu

Now, you can follow the instructions below to add the custom field to the WooCommerce product:

  • Click on the Add New button at the top of the screen.
  • Press the Add Field button and pick a label for the new field that is used as its name.
  • Choose the Field type such as text, checkbox, or email.
Add new field group in WooCommerce product

For this example, let’s add an Email field to collect the author’s email address.

Set author’s email address for new field group in WooCommerce product
  • Open Field Type and choose Email from the list.
  • Fill the instructions box by writing a text like “Please fill out your email address before publishing your post.” (Optional).
Writing instructions box for new field group in WooCommerce product
  • Enable the Required field if this is a necessary field.
Enable Required field for new field group in WooCommerce product
  • Set up the Advanced Options like Conditional logic (Optional)
  • Click on the Close Field to add custom field to WooCommerce products.
Click on Close Field to add custom field to WooCommerce products

If you want to let WooCommerce add a group of fields to products, simply choose the Add Field button and repeat the process.

WooCommerce add a group of fields to products

Note: In the Location section, you can create a set of rules to determine which edit screens will use these advanced custom fields. If you want to show these custom fields in WooCommerce products you must set “Post Type” equal to “Products”.

WooCommerce product bulk edit plugin

Conclusion

By default, WooCommerce cannot bulk edit custom fields of products. Therefore, for bulk edit product meta fields WooCommerce, you should take help from product meta fields bulk editor WooCommerce. In this post, we introduced the WooCommerce Products Bulk Editing plugin and explained how you can use it to edit custom fields. This plugin has many features and capabilities that help store managers edit and manage their products quickly.

Leave a Reply

Your email address will not be published. Required fields are marked *

Sign in

No account yet?

We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies.

4.7
Based on 497 reviews
5 star
69
69%
4 star
30
30%
3 star
1
1%
2 star
0
0%
1 star
0
0%
1-5 of 497 reviews
  1. M

    Best app!

  2. G

    Great support!

  3. V

    I wan to add 500+ variations, I tried 10’s of plugins, but none of the plugin is solving my problem, but Bulk Variation Plugin is helping me with it.

  4. P

    I purchased this plugin to enhance functionality on a client’s website. While I found other plugins, some cheaper or even free, none matched the ease of customization and clean, tailored layout offered by this one. I’m pleased with the responsive support;

  5. S

    Extraordinary service and quality of this plugin! The plugin is very flexible and good, and the support of the developers are extraordinary. They did, free of charge, alter the plugin for me!! A+++++