1. WooCommerce Product Table
  2. Advanced Usage

How to disable sorting in WooCommerce Product Table

If you want to disable sorting for individual columns in WooCommerce Product Table, please see the wc_product_table_column_sortable hook in the Developer Documentation.

If you want to completely disable column sorting in your product tables, you can use the following code. Add this to a custom plugin or inside your theme's functions.php file:

// Disable column sorting
add_filter( 'wc_product_table_data_config', function( $config ) {
    $config['ordering'] = false;
    return $config;
} );

Was this article helpful?

Related Articles

Still need help?
If searching the knowledge base hasn't answered your question, please contact support.