WP Manifestindependent plugin directory
manifest / ecommerce / easy-woo-product-table

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

0stars
0forks

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.zip

Readme

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

  1. WordPress: Version 5.6 or higher.
  2. WooCommerce: Version 5.0 or higher must be installed and active.
  3. PHP: Version 7.4 or higher.
  4. Product Data: Your store must have products (Simple or Variable) to display. Note: For testing, importing WooCommerce sample data is recommended.

Installation

Automatic Installation

  1. Log in to your WordPress Dashboard.
  2. Navigate to Plugins > Add New.
  3. Click Upload Plugin at the top.
  4. Choose the easy-woo-product-table.zip file and click Install Now.
  5. Click Activate Plugin.

Manual Installation

  1. Unzip the easy-woo-product-table.zip archive.
  2. Upload the easy-woo-product-table folder to your /wp-content/plugins/ directory via FTP/SFTP.
  3. Log in to WordPress and go to the Plugins screen.
  4. Locate "Easy Product Table for WooCommerce" and click Activate.

Usage Guide

1. Creating a Table

  1. Navigate to Product Tables > Add New in the WordPress admin menu.
  2. 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

  1. Once you save the table, look for the Shortcode card at the top of the edit screen (or in the "All Tables" list).
  2. Copy the shortcode: [product_table id="123"]
  3. 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.php acts as an abstraction layer for CRUD operations, interfacing with wp_posts and wp_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 optimized WP_Query arguments.

  • 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

  1. Native Autoloader: We implemented a lightweight SPL autoloader in the main file to avoid requiring users to run Composer commands.
  2. 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.
  3. Performance: Frontend assets (frontend.css, frontend.js) are only enqueued when the shortcode runs, keeping the rest of the site fast.

Known Limitations

  1. 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.
  2. Custom Fields: Currently, the plugin supports standard WooCommerce fields (SKU, Price, Stock). Displaying custom meta fields requires code customization.
  3. 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

Read the full README on GitHub →