Easy Product Table for WooCommerce
A WordPress plugin that allows a store administrator to create, save, and manage multiple WooCommerce Product tables.
by Forhad Khan · github.com/forhadkhan/easy-woo-product-table
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/forhadkhan/easy-woo-product-table/archive/refs/heads/main.zipReadme
Easy Product Table for WooCommerce
Tags: woocommerce, product table, product list, wholesale, order form
Requires at least: 5.6
Tested up to: 6.9
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
A WordPress plugin that allows a store administrator to create, save, and manage multiple WooCommerce Product tables.
Description
Easy Product Table for WooCommerce is a lightweight, developer-friendly plugin that allows store owners to list their WooCommerce products in a responsive, searchable, and sortable table layout. It is perfect for wholesale stores, bulk order forms, restaurant menus, and product catalogs where quick ordering is essential.
Key Features
- Drag & Drop Column Builder: Easily reorder columns like Image, Name, SKU, Price, Stock, and Add to Cart.
- Responsive Design: Choose which columns to hide on mobile devices for a clutter-free experience.
- AJAX-Powered: Instant search, pagination, and bulk add-to-cart without page reloads.
- Flexible Querying: Display products by specific category, sale status, or manually select specific products.
- Developer Friendly: Built with a strict Object-Oriented architecture, abiding by WordPress Coding Standards.
Requirements
- WordPress: Version 5.6 or higher.
- WooCommerce: Version 5.0 or higher must be installed and active.
- PHP: Version 7.4 or higher.
- Product Data: Your store must have products (Simple or Variable) to display. Note: For testing, importing WooCommerce sample data is recommended.
Installation
Automatic Installation
- Log in to your WordPress Dashboard.
- Navigate to Plugins > Add New.
- Click Upload Plugin at the top.
- Choose the
easy-woo-product-table.zipfile and click Install Now. - Click Activate Plugin.
Manual Installation
- Unzip the
easy-woo-product-table.ziparchive. - Upload the
easy-woo-product-tablefolder to your/wp-content/plugins/directory via FTP/SFTP. - Log in to WordPress and go to the Plugins screen.
- Locate "Easy Product Table for WooCommerce" and click Activate.
Usage Guide
1. Creating a Table
- Navigate to Product Tables > Add New in the WordPress admin menu.
- Table Name: Enter a descriptive name for your table (e.g., "Wholesale List").
2. Configuring Settings
-
Product Source: Choose which products to display.
-
All Products: Lists everything in your store.
-
On Sale: Lists only discounted items.
-
Specific Categories: Select one or more product categories.
-
Specific Products: Manually search and select individual products.
-
Columns:
-
Drag and drop items in the list to change their order.
-
Uncheck items to hide them from the table.
-
Note: The "Checkbox (Bulk)" column is required if you want to use the "Add Selected to Cart" feature.
-
Display Settings:
-
Items Per Page: Control how many rows appear before pagination starts.
-
Search Box: Enable a live search bar above the table.
-
Category Filter: Enable a dropdown filter for frontend users.
-
Hide on Mobile: Select columns that should disappear on smaller screens to prevent horizontal scrolling.
-
Table Styling: Choose from Default, Minimal, or Striped presets.
3. Displaying the Table
- Once you save the table, look for the Shortcode card at the top of the edit screen (or in the "All Tables" list).
- Copy the shortcode:
[product_table id="123"] - Paste this shortcode into any WordPress Page, Post, or Text Widget.
Architecture Overview
This plugin follows a strict Model-View-Controller (MVC) inspired architecture, utilizing Namespaces and Autoloading to ensure code cleanliness and prevent conflicts.
Directory Structure
-
app/Core/: Handles plugin initialization (Plugin.php), the autoloader, and registering Custom Post Types. -
app/Database/: The Model layer.TableRepository.phpacts as an abstraction layer for CRUD operations, interfacing withwp_postsandwp_postmeta. -
app/Admin/: The Controller layer for the backend. Handles menu creation (AdminMenu.php), saving logic (SaveHandler.php), and product search via AJAX. -
app/Frontend/: The Controller layer for the frontend. -
Shortcode.php: The entry point for rendering. -
QueryBuilder.php: Translates table settings into optimizedWP_Queryarguments. -
TableRenderer.php: Logic for generating HTML. -
app/API/: Handles frontend AJAX requests (pagination, filtering, bulk actions). -
templates/: The View layer. Separates HTML markup from PHP logic. -
admin/: Views for the dashboard. -
frontend/: Views for the public table (Controls vs Content). -
assets/: Contains CSS and JS files, organized by context (Admin vs Frontend).
Design Decisions
- Native Autoloader: We implemented a lightweight SPL autoloader in the main file to avoid requiring users to run Composer commands.
- Security First: Extensive use of Nonces (
check_admin_referer), Capability Checks (current_user_can), and Sanitization (sanitize_text_field,wp_kses_post) ensures the plugin is secure against XSS and CSRF attacks. - Performance: Frontend assets (
frontend.css,frontend.js) are only enqueued when the shortcode runs, keeping the rest of the site fast.
Known Limitations
- Variable Products: The table displays variable products, but currently links them to the single product page for option selection. It does not support selecting variations (Size/Color) directly inside the table row.
- Custom Fields: Currently, the plugin supports standard WooCommerce fields (SKU, Price, Stock). Displaying custom meta fields requires code customization.
- Styling: While CSS classes are provided, advanced styling requires custom CSS in your theme.
Changelog
1.0.0
- Initial release.
- Core features: Drag & Drop columns, AJAX pagination, Bulk Add to Cart.
- Security: Full nonce verification and input sanitization.
- Compliance: Passes WordPress Plugin Check (PCP) (Version 1.7.0 | By WordPress Performance Team and Plugin Review Team) standards.
Credits
Author: Forhad Khan