# Wow Extensions for WooCommerce

=== Wow Extensions for WooCommerce ===
Contributors: (your-username)
Tags: woocommerce, extensions, role-based pricing, pricing
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Powerful WooCommerce extensions: role-based pricing and more. Enable or disable features from one dashboard.

## Features

### Role Based Pricing
Set different prices for different user roles. Perfect for:
- Wholesale pricing
- Member discounts
- VIP customer pricing
- Role-specific promotions

## Installation

1. Upload the plugin files to `/wp-content/plugins/wow-extensions-for-woocommerce/`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Ensure WooCommerce is installed and activated
4. Go to **Wow Extensions** in the WordPress admin menu to configure features

## Usage

### Enabling/Disabling Features

1. Navigate to **Wow Extensions** in your WordPress admin menu
2. Open the **Features** section and select a feature tab
3. Use the **Enable/Disable** toggle for that feature; when you turn it ON, the configuration section expands inline below
4. Click **Save Changes** to save your choices
5. Changes take effect after saving

### Role Based Pricing

1. Go to **Products** → **Add New** or edit an existing product
2. Scroll down to the **Product Data** meta box
3. Find the **Role Based Pricing** section
4. Set regular and sale prices for each user role
5. Leave fields empty to use the default product price
6. Save the product

#### For Variable Products

1. Edit a variable product
2. In the **Variations** tab, expand a variation
3. Find the **Role Based Pricing** section
4. Set prices for each role
5. Save the variation

## Requirements

- WordPress 5.8 or higher
- WooCommerce 5.0 or higher
- PHP 7.4 or higher

## Plugin Structure

```
wow-extensions-for-woocommerce/
├── assets/
│   ├── css/
│   │   └── admin.css
│   └── js/
│       └── admin.js
├── extensions/
│   └── role-based-pricing/
│       └── class-role-based-pricing.php
├── includes/
│   ├── class-admin.php
│   ├── class-extensions-manager.php
│   └── class-helper.php
├── wow-extensions-for-woocommerce.php
└── README.md
```

## Adding New Extensions

To add a new extension:

1. Create a new directory in `extensions/your-extension-name/`
2. Create a class file `class-your-extension-name.php`
3. Implement the extension class with:
   - `get_feature_info()` method returning title and description
   - Required hooks and functionality
4. Register the extension:

```php
add_filter( 'wowexfow_registered_extensions', function( $extensions ) {
    $extensions['your_extension_slug'] = 'Your_Extension_Class_Name';
    return $extensions;
} );
```

5. (Optional) To show configuration options inline below the toggle when the feature is enabled, output your settings HTML:

```php
add_filter( 'wowexfow_feature_settings_content', function( $content, $feature_slug ) {
    if ( 'your_extension_slug' !== $feature_slug ) {
        return $content;
    }
    ob_start();
    ?>
    <div class="your-extension-settings">
        <!-- Your form fields, tables, etc. -->
    </div>
    <?php
    return ob_get_clean();
}, 10, 2 );
```

When the toggle is ON, this content is shown in an expandable section directly below the toggle. When OFF, the section is hidden.

## Support

For support, feature requests, or bug reports, please contact the plugin author.

## Changelog

### 1.0.0
- Initial release
- Role Based Pricing feature
- Admin dashboard for feature management

## License

This plugin is licensed under GPL v2 or later.
