Prevent Attributes from appearing in the bulk editor

The PW Bulk Edit Pro plugin will load in all available Attributes for filtering and assigning to products. Depending on your WooCommerce store you might have a lot of attributes and it will feel cluttered in the bulk editor.

To prevent any Attributes from being available in the Bulk Editor, follow these steps:

1. Install the free Code Snippets plugin (https://wordpress.org/plugins/code-snippets/)
2. Create a new Snippet with the following code:

function custom_pwbe_attributes( $attributes ) {
    $attributes = array();
    return $attributes;
}
add_filter( 'pwbe_attributes', 'custom_pwbe_attributes' );

This will prevent any attributes from being shown. If you would like to show only specific attributes, change the code to this:

function custom_pwbe_attributes( $attributes ) {
    $attributes = array(
        array( 'slug' => 'pa_color', 'name' => 'Color' ),
        array( 'slug' => 'pa_size', 'name' => 'Size' ),
    );
    return $attributes;
}
add_filter( 'pwbe_attributes', 'custom_pwbe_attributes' );

Specify the attribute slug and name where appropriate. You can find the slug inside your WordPress Admin area under Products -> Attributes (just prefix with “pa_”)

Skip to content