1. Home
  2. Documentation
  3. WooCommerce Product Table
  4. Advanced Usage
  5. Disabling the responsive features in WooCommerce Product Table

Disabling the responsive features in WooCommerce Product Table

By default, your product tables are loaded in ‘responsive mode’. This means that the contents of the table will adapt and adjust based on the screen size they’re being viewed upon.

For example, on a mobile device where space is limited, only two or three columns might be displayed to the user. The remaining columns are ‘folded’ into a child row, which can be toggled open and closed using the “+” icon next to each row.

For more information on controlling which columns are displayed or hidden, see the priorities option. To control the method used to display the ‘hidden’ data, see the responsive display option.

If you would like to disable the responsive behavior entirely, you would need to add some code your theme or child theme (e.g. inside the functions.php file), as there is no direct shortcode option for this.

To disable, add this code:

function wcpt_inline_table_config_no_responsive( $config ) {
   $config['responsive'] = false;
   return $config;
}
add_filter( 'wc_product_table_inline_config', 'wcpt_inline_table_config_no_responsive', 10, 2 );

 

 

Was this article helpful?

Related Articles