=== Easy Store Management by AyudaWP ===
Contributors: fernandot, ayudawp
Tags: woocommerce, shop manager, admin, dashboard, store
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Simplifies admin dashboard for WooCommerce shop managers by hiding non-store elements and reorganizing menus for better store management workflow.

== Description ==

Easy Store Management by AyudaWP transforms the WordPress admin dashboard into a clean, focused store management environment specifically designed for WooCommerce shop managers.

**Key Features:**

* **Clean Interface**: Hides all non-store related WordPress menus and widgets from shop managers
* **Reorganized Menus**: Moves important WooCommerce sections like Orders and Customers to top-level menus
* **Focused Dashboard**: Removes WordPress widgets, keeping only WooCommerce-related dashboard widgets
* **Enhanced Admin Bar**: Adds quick access to orders and removes non-store elements
* **Role-Based**: Only affects users with the "Shop Manager" role - administrators and other roles remain unaffected

**What gets hidden/reorganized:**

* WordPress core menus (Posts, Pages, Comments, Users, Tools, etc.)
* Non-WooCommerce plugin menus
* WordPress dashboard widgets (Quick Draft, At a Glance, etc.)
* Non-store items from admin bar

**Menu reorganization:**

1. Dashboard (WordPress default)
2. Store (renamed WooCommerce main menu)
3. Orders (promoted to top-level)
4. Customers (promoted to top-level)
5. Products (existing top-level menu)

This plugin is perfect for store owners who want to provide their shop managers with a clean, distraction-free environment focused solely on store operations.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/easy-store-management-ayudawp` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Make sure WooCommerce is installed and activated.
4. The plugin will automatically apply customizations for users with the "Shop Manager" role.

== Frequently Asked Questions ==

= Does this plugin affect administrators? =

No, this plugin only affects users with the "Shop Manager" role. Administrators will continue to see the full WordPress admin interface.

= Can I customize which menus are hidden? =

Currently, the plugin follows a predefined set of menus to hide/show. Future versions may include customization options.

= Will this work with other WooCommerce extensions? =

Yes, the plugin is designed to preserve WooCommerce-related menus from extensions and only hide core WordPress and non-WooCommerce plugin menus.

= What happens if I deactivate WooCommerce? =

The plugin checks for WooCommerce on activation and will show an admin notice if WooCommerce is not active. The customizations will not apply without WooCommerce.

== Screenshots ==

1. Cluttered Wordpress admin, displaying all widgets and menus, most of them unnecessary for a store manager
2. Clean and reorganized dashboard, showing only store-related options for shop managers
3. The new and enhanced admin bar with quick access to orders

== Changelog ==

= 1.0.4 =
* Tested up to WooCommerce 10.7

= 1.0.3 =
Tested up to WordPress 7.0

= 1.0.2 =
* Improved: Enhanced WooCommerce widget detection to automatically show dashboard widgets from WooCommerce extensions and third-party plugins
* Improved: Widget detection now includes keyword-based analysis (shop, store, order, product, sale, etc.) to identify WooCommerce-related widgets
* Added: Filter `ayudawp_esm_is_woocommerce_widget` to allow developers to manually declare widgets as WooCommerce-related
* Changed: Admin bar orders counter now shows combined count of pending payment + on-hold orders instead of only pending payment
* This provides better visibility of orders requiring immediate attention from shop managers

= 1.0.1 =
* Fixed: PHP warning `foreach() argument must be of type array|object, null given` when manipulating WordPress admin menus
* Fixed: Orders pending count badge now displays correctly in both frontend and backend admin bar
* Improved: Added safety validations for all menu manipulation functions to prevent PHP warnings
* Improved: Enhanced frontend asset loading to ensure proper display of admin bar elements
* Improved: Better detection of when to apply shop manager customizations in frontend
* Added: Safe wrapper functions for `remove_menu_page()` and `remove_submenu_page()` operations

= 1.0.0 =
* Initial release
* Hide non-WooCommerce menus for shop managers
* Reorganize WooCommerce menus (Orders and Customers to top-level)
* Clean dashboard widgets
* Enhanced admin bar with quick order access
* Full translation support

== Upgrade Notice ==

= 1.0.3 =
* Tested up to WooCommerce 10.6.x
* Tested up to WordPress 7.0

= 1.0.2 =
Improvements: Better detection of WooCommerce extension widgets and more useful order counter (pending + on-hold). Recommended update.

= 1.0.1 =
Bug fixes: Eliminates PHP warnings and ensures orders counter displays correctly in frontend. Recommended update for all users.

= 1.0.0 =
Initial release of Easy Store Management by AyudaWP plugin.

== Support ==

= Need help or have suggestions? =
* [Official website](https://servicios.ayudawp.com/)
* [WordPress support forum](https://wordpress.org/support/plugin/easy-store-management-ayudawp/)
* [YouTube channel](https://www.youtube.com/AyudaWordPressES)
* [Documentation and tutorials](https://ayudawp.com/)

**Love the plugin?** Please leave us a 5-star review and help spread the word!

== About AyudaWP ==

We are specialists in WordPress security, SEO, and performance optimization plugins. We create tools that solve real problems for WordPress site owners while maintaining the highest coding standards and accessibility requirements.