Skip to content

realsepehrz/dynamic-menu-product-categories

Repository files navigation

Dynamic Menu Product Categories

Dynamic Menu Product Categories automatically syncs WooCommerce product categories into selected WordPress menus. This fork adds modern compatibility checks, performance and security improvements, and a bulk import that preserves category hierarchy.

Key Features

  • Automatically sync product categories into selected navigation menus
  • Bulk import of all existing product categories while preserving hierarchy
  • Performance optimizations using WordPress object cache
  • Rate limiting to avoid server overload during large updates
  • Nonce and capability checks for secure admin operations
  • Compatible with PHP 7.4+, WordPress 5.8+, WooCommerce 6.0+

Requirements

  • PHP 7.4 or newer
  • WordPress 5.8 or newer
  • WooCommerce 6.0 or newer

Installation

  1. Copy the dynamic-menu-product-categories folder to /wp-content/plugins/
  2. Activate the plugin from the WordPress admin Plugins screen
  3. Go to Settings > Dynamic Menu Product Categories to configure

Usage

  1. Select one or more menus in the plugin settings and click Save Changes.
  2. The plugin will automatically sync categories as they are created/edited/deleted.
  3. To import all existing categories into the selected menus (preserves hierarchy):
    • Go to Settings > Dynamic Menu Product Categories
    • Select the menu(s) and save
    • Click the Import All Categories button

Notes:

  • The bulk import will skip categories already present in the menu to avoid duplicates.
  • For very large catalogs, perform the import on a staging server or during low-traffic windows.

Changelog

See readme.txt for the detailed changelog. Highlights:

1.1

  • Added bulk import feature (preserves parent-child hierarchy)
  • Added PHP/WordPress/WooCommerce compatibility checks
  • Implemented caching and rate-limiting
  • Security and code modernisation

License

This plugin is distributed under the GNU General Public License v2 or later (GPL-2.0-or-later). See the LICENSE file.

Contributors & Credits

  • Pal Code — original developer (original WordPress.org release)
  • abuayesh — listed contributor in original release
  • Sepehr Zekavat — compatibility, security and bulk-import enhancements, README and packaging

Support

If you run into issues, test on a staging environment first. For questions about this fork, open an issue on the GitHub repository where you publish this code.

About

A handy plugin to keep Wordpress menu's that show Woocommerce product categories up to date

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages