{"id":24692575,"url":"https://github.com/allworknoplay-95/wp-cli-create-menu-items-from-prod-cat","last_synced_at":"2026-04-30T02:38:20.205Z","repository":{"id":273347800,"uuid":"919402687","full_name":"AllWorkNoPlay-95/wp-cli-create-menu-items-from-prod-cat","owner":"AllWorkNoPlay-95","description":"A WP-CLI command to create WordPress menu items dynamically from product categories in WooCommerce. Simplify and automate menu management for your eCommerce sites.","archived":false,"fork":false,"pushed_at":"2025-01-21T12:39:41.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-11T22:11:59.890Z","etag":null,"topics":["woocommerce","wordpress","wp-cli"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AllWorkNoPlay-95.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-20T10:25:59.000Z","updated_at":"2025-01-21T12:39:44.000Z","dependencies_parsed_at":"2025-01-20T11:32:03.620Z","dependency_job_id":"b616975d-d926-451a-95cf-f5d0d3e2daee","html_url":"https://github.com/AllWorkNoPlay-95/wp-cli-create-menu-items-from-prod-cat","commit_stats":null,"previous_names":["allworknoplay-95/wp-cli-create-menu-items-from-prod-cat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AllWorkNoPlay-95/wp-cli-create-menu-items-from-prod-cat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllWorkNoPlay-95%2Fwp-cli-create-menu-items-from-prod-cat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllWorkNoPlay-95%2Fwp-cli-create-menu-items-from-prod-cat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllWorkNoPlay-95%2Fwp-cli-create-menu-items-from-prod-cat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllWorkNoPlay-95%2Fwp-cli-create-menu-items-from-prod-cat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AllWorkNoPlay-95","download_url":"https://codeload.github.com/AllWorkNoPlay-95/wp-cli-create-menu-items-from-prod-cat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllWorkNoPlay-95%2Fwp-cli-create-menu-items-from-prod-cat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32452743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["woocommerce","wordpress","wp-cli"],"created_at":"2025-01-26T20:16:34.464Z","updated_at":"2026-04-30T02:38:20.183Z","avatar_url":"https://github.com/AllWorkNoPlay-95.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WP-CLI Create Menu Items from Product Categories\n\n## Description\nThis script generates a navigation structure for WordPress menus (compatible with Max Mega Menu) using WooCommerce product categories. It simplifies menu management by automating the creation, update, and deletion of menu items based on the product category hierarchy.\n\n## Features\n- Dynamically create menu items from WooCommerce product categories.\n- Support for custom parent items (e.g., grouping specific categories under a parent like \"Other\").\n- Automatically sort items by product count.\n- Options to update, delete, or clean up menu items.\n\n## Requirements\n- Python 3.6 or later.\n- WP-CLI installed and properly configured.\n- WooCommerce plugin active in your WordPress installation.\n\n## Installation\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/AllWorkNoPlay-95/wp-cli-create-menu-items-from-prod-cat.git\n   cd wp-cli-create-menu-items-from-prod-cat\n   ```\n2. Ensure the script is executable:\n   ```bash\n   chmod +x create-menu-items.py\n   ```\n3. Run the script with the required options.\n\n## Usage\nRun the script with the following options:\n\n### Arguments\n- `-u, --update-existing`: Update existing menu items by setting parents and order.\n- `--delete-all`: Delete all menu items and start fresh.\n- `--delete-orphans`: Remove menu items not present in the product categories.\n- `-C, --with-count`: Append product counts to the last-level menu items.\n- `-v`: Enable verbose mode for detailed output.\n\n### Examples\n- Create a new menu structure from product categories:\n  ```bash\n  ./create-menu-items.py\n  ```\n- Update an existing menu structure:\n  ```bash\n  ./create-menu-items.py -u\n  ```\n- Delete all existing menu items and create a new structure:\n  ```bash\n  ./create-menu-items.py --delete-all\n  ```\n\n## Customization\nYou can configure:\n- Custom parent items by modifying the `custom_parents` variable in the script.\n- Categories to exclude by editing `categorySlugsToSkip`.\n\n## License\nThis script is licensed under the GPL-3.0 License.  \nSee the [LICENSE](LICENSE) file for more details.\n\n## Author\nDeveloped by **Samuele Mancuso**  \nGitHub: [AllWorkNoPlay-95](https://github.com/AllWorkNoPlay-95)\n\n---\n\n## For Recruiters\nThis project demonstrates proficiency in the following technical areas:\n\n- **Python Programming**: Writing clean, modular, and reusable code for task automation and data processing.\n- **WordPress Development**: Integrating with WP-CLI to interact programmatically with WordPress and WooCommerce.\n- **JSON Parsing and Manipulation**: Extracting, transforming, and utilizing structured data from various sources.\n- **Command Line Automation**: Executing and processing system commands efficiently for dynamic menu generation.\n- **Data Structures and Algorithms**: Creating hierarchical structures and sorting algorithms to map complex relationships like nested product categories.\n- **Error Handling and Debugging**: Implementing robust error-handling mechanisms to manage cache misses and inconsistencies.\n- **Optimization and Scalability**: Designing the script to handle large datasets and multiple levels of hierarchy while maintaining performance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallworknoplay-95%2Fwp-cli-create-menu-items-from-prod-cat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallworknoplay-95%2Fwp-cli-create-menu-items-from-prod-cat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallworknoplay-95%2Fwp-cli-create-menu-items-from-prod-cat/lists"}