Skip to content

Releases: realsepehrz/dynamic-menu-product-categories

v1.1 — Bulk import + compatibility, performance & security updates

28 Oct 15:37

Choose a tag to compare

Release v1.1 — Compatibility, Performance, Security, and Bulk Import

Summary

Version 1.1 modernizes the plugin for current WordPress environments and introduces a bulk Import All Categories feature. This functionality imports all existing WooCommerce product categories into selected menus while preserving the parent → child hierarchy.

Additional improvements include compatibility checks, performance enhancements (caching and rate-limiting), security hardening, and updated documentation and licensing for GitHub distribution.


Highlights

Bulk Import

  • New Feature: “Import All Categories” button added under
    Settings → Dynamic Menu Product Categories
  • Automatically imports all WooCommerce product categories into selected menu(s)
  • Preserves full parent-child hierarchy

Compatibility Checks

  • Plugin will warn or halt if minimum requirements are not met:
    • PHP ≥ 7.4
    • WordPress ≥ 5.8
    • WooCommerce ≥ 6.0

Performance Enhancements

  • Utilizes WordPress object cache for heavier operations
  • Adds transient-based lock to prevent rapid repeated updates
  • Skips already-present menu items to avoid duplication

Security & Robustness

  • Nonce verification for admin actions
  • Capability checks (manage_options) for import operations
  • Improved input sanitization and safer UI output via esc_* functions

UX / Admin Improvements

  • Admin page updated with:
    • Import All Categories control
    • Clear success/error messages

Packaging & Documentation

  • Added full LICENSE file (GPL-2.0-or-later)
  • Added README.md and CONTRIBUTORS.md for GitHub
  • Updated readme.txt and changelog entries

Changelog (Short)

  • Added: Bulk import with hierarchy preservation
  • Added: PHP/WordPress/WooCommerce version checks
  • Added: Object cache usage and rate-limiting
  • Added: Nonce/capability checks and improved error messaging
  • Improved: Admin UI and documentation
  • Added: LICENSE (GPL-2.0-or-later), README.md, CONTRIBUTORS.md

Upgrade Notes / Important

  • Minimum version requirements are now enforced.
    If your environment does not meet them, the plugin will not run and will display an admin notice.
  • Always back up your database before running bulk import—especially on production sites.
  • Bulk import is idempotent and skips existing menu items, but for large catalogs, consider running it on staging or during low-traffic periods.
  • Bulk import creates nav_menu_item posts. If you deactivate or remove the plugin, you may need to manually clean up menu items via Appearance → Menus.

How to Use the Bulk Import

  1. Navigate to Settings → Dynamic Menu Product Categories in WordPress admin.
  2. Select one or more menus for category import and click Save Changes.
  3. Scroll to the Import All Categories section and click the button.
  4. Wait for the success message. For large catalogs, monitor server performance during the first import.

Testing Suggestions

  • Run the import on a staging site first.
  • Use a menu with nested categories to verify hierarchy preservation.
  • Confirm that newly added categories continue syncing automatically (create/edit/delete events).
  • Inspect menu items in Appearance → Menus to verify parent-child structure.

Credits

  • Original Developer: Pal Code (WordPress.org release)
  • Contributor(s): abuayesh (original listing)
  • Updated & Maintained by: Sepehr Zekavat
    • Compatibility checks
    • Caching and rate-limiting
    • Bulk import
    • Admin UI and documentation improvements
    • General hardening

License

This repository is licensed under GNU GPL v2 or later (SPDX: GPL-2.0-or-later).
See the LICENSE file for details.