Title: Simple Role Based Pricing
Author: Thomas Lloancy
Published: <strong>21. 5. 2025</strong>
Last modified: 3. 4. 2026

---

Prohledat pluginy

![](https://ps.w.org/simple-role-based-pricing/assets/banner-772x250.png?rev=3297813)

![](https://ps.w.org/simple-role-based-pricing/assets/icon-128x128.png?rev=3297813)

# Simple Role Based Pricing

 Autor: [Thomas Lloancy](https://profiles.wordpress.org/tlloancy/)

[Stáhnout](https://downloads.wordpress.org/plugin/simple-role-based-pricing.1.2.2.zip)

 * [Podrobnosti](https://cs.wordpress.org/plugins/simple-role-based-pricing/#description)
 * [Hodnocení](https://cs.wordpress.org/plugins/simple-role-based-pricing/#reviews)
 *  [Instalace](https://cs.wordpress.org/plugins/simple-role-based-pricing/#installation)
 * [Vývojáři](https://cs.wordpress.org/plugins/simple-role-based-pricing/#developers)

 [Podpora](https://wordpress.org/support/plugin/simple-role-based-pricing/)

## Popis

Simple Role Based Pricing is a lightweight and flexible WooCommerce plugin that 
allows you to set custom prices or discounts for products based on user roles. Configure
global pricing rules, restrict discounts to specific product categories, apply bulk
actions, or set role-specific prices per product with Quick Edit support. The plugin
ensures robust pricing logic with category-based restrictions and detailed debug
logging for troubleshooting.

### Key Features

 * **Role-Based Pricing**: Set fixed prices, percentage discounts, or fixed-amount
   discounts for specific user roles.
 * **Category Restrictions**: Apply discounts only to products in selected categories(
   e.g., „storage“).
 * **Global Rules**: Define pricing rules for all products or specific categories
   in WooCommerce Settings.
 * **Bulk Editing**: Adjust prices for multiple products at once.
 * **Quick Edit Support**: Set role-based prices directly from the product list.
 * **Flexible Compatibility**: Works with simple and variable WooCommerce products.
 * **Debug Logging**: Detailed logs for troubleshooting pricing issues, including
   category matching.

### Use Cases

 * Offer exclusive discounts to VIP customers or wholesalers.
 * Restrict discounts to specific product categories for certain roles.
 * Create role-specific pricing for B2B or B2C customers.

### Compatibility

 * **WooCommerce**: Required (version 4.0 or higher recommended).
 * **User Role Editor**: Optional, for managing custom user roles.
 * **Other Role Management Plugins**: Compatible with plugins that add custom roles
   to WordPress.
 * **Themes**: Tested with popular themes like Twenty Twenty-Five and Astra.

### Configuration

 1. **Global Rules**:
 2.  * Navigate to **WooCommerce > Settings > Role Based Pricing**.
     * Select a user role (e.g., Administrator, Customer).
     * Choose whether to apply pricing to **All Products** or **Specific Categories**.
     * Set the discount type (Percentage, Fixed Amount, or Fixed Price) and value.
     * Save changes to apply the rules site-wide.
 3. **Category Restrictions**:
 4.  * Select **Specific Categories** and choose the desired product categories (e.
       g., „storage“).
     * Only products in these categories will receive the discount for the specified
       role.
 5. **Per-Product Pricing**:
 6.  * Edit a product and use the **Quick Edit** option to set role-specific prices.
     * Alternatively, configure prices in the product’s **Role Based Pricing** settings.

### Debugging

 * The plugin includes detailed debug logging to troubleshoot pricing issues.
 * Logs are stored in `/wp-content/uploads/simple-role-based-pricing/simproba-debug.
   log`.
 * To view logs:
    `bash tail -n 200 /var/www/html/wordpress/wp-content/uploads/simple-
   role-based-pricing/simproba-debug.log

## Snímky obrazovky

 * [[
 * [[
 * [[

## Instalace

 1. Upload the `simple-role-based-pricing` folder to `/wp-content/plugins/`.
 2. Activate the plugin through the **Plugins** menu in WordPress.
 3. Go to **WooCommerce > Settings > Role Based Pricing** to configure global pricing
    rules.
 4. Optionally, edit individual products to set role-specific prices via Quick Edit
    or the product settings.

## Recenze

Pro tento plugin nejsou žádné recenze.

## Autoři

Simple Role Based Pricing je otevřený software. Následující lidé přispěli k vývoji
tohoto pluginu.

Spolupracovníci

 *   [ Thomas Lloancy ](https://profiles.wordpress.org/tlloancy/)

[Přeložte “Simple Role Based Pricing” do svého jazyka.](https://translate.wordpress.org/projects/wp-plugins/simple-role-based-pricing)

### Zajímá vás vývoj?

[Prohledejte kód](https://plugins.trac.wordpress.org/browser/simple-role-based-pricing/),
podívejte se do [SVN repozitáře](https://plugins.svn.wordpress.org/simple-role-based-pricing/),
nebo se přihlaste k[ odběru protokolu vývoje](https://plugins.trac.wordpress.org/log/simple-role-based-pricing/)
pomocí [RSS](https://plugins.trac.wordpress.org/log/simple-role-based-pricing/?limit=100&mode=stop_on_copy&format=rss).

## Přehled změn

#### 1.2.2

 * Fix: Add missing ‚enable‘ column and move DB setup to activation.

#### 1.2.1

 * Fix: Some console logs were badly commented.

#### 1.2.0

 * Performance: Cleaned up all debug logs and console.log for production use.
 * Fix: Added explicit WooCommerce activation check.
 * Fix: Declared full High-Performance Order Storage (HPOS) compatibility.
 * Fix: UI Overhaul – Removed custom background styles to match WooCommerce Native
   UI.

#### 1.1.9

 * Made Specific Categories fully free and usable without Pro restrictions.

#### 1.1.8

 * Improvement: Switched to modern WooCommerce pricing flow using native get_price
   filters for item prices, subtotals, and totals (no artificial coupon needed on
   WC >= 3.2).
 * Fix: Correct category handling for variable products (now uses $product->get_category_ids()
   instead of wp_get_post_terms on variation ID).
 * Added: Automatic cart recalculation on user login to apply role-based prices 
   if user logs in after adding items to cart.
 * Added: Explicit set_price() calls on woocommerce_before_calculate_totals hook
   for maximum reliability.
 * Changed: Coupon ‚simproba_role_discount‘ is no longer created or applied on WooCommerce
   >= 3.2  cleaner checkout display (no mystery discount line).
 * Tweak: Refactored pricing logic into a reusable method to reduce duplication 
   and improve maintainability.
 * Note: Fully backward compatible – coupon logic remains active only for very old
   WooCommerce versions (< 3.2).

#### 1.1.7

 * Changed: Long time deprecated ${var} by {$var} , stopping all related php 8+ 
   warnings by the way

#### 1.1.6

 * Added / Fixed: Discount wasn’t applied at checkout. At all. So coupon method 
   was applied for clearness.

#### 1.1.4

 * Added: Pro version indicator for „Specific Categories“ option in the Apply To
   selector, with a modern inline notification for free version users.

#### 1.1.3

 * Fixed: Css overstep beyond role-pricing tab + overthrow main woocommerce aspect
   with first rule

#### 1.1.2

Table name interpolation is to be ignored.

#### 1.1.1

 * Fixed: Added missing translators comments in product-fields.php for internationalization.
 * Fixed: Corrected SQL queries in multiple files to properly use $wpdb->prepare()
   without backticks.
 * Fixed: Enhanced sanitization for $_POST categories input in admin-settings.php.
 * Fixed: Replaced all %s strings that define tables names in prepared requests 
   by identifier %i.

#### 1.1.0

 * Fixed: Addressed security issues from QIT tests (data sanitization, SQL queries,
   nonces).
 * Fixed: Corrected WordPress.org Plugin Check violations (internationalization,
   WP_Filesystem).
 * Fixed: Corrected SQL syntax errors in database queries.
 * Fixed: Improved log file permission handling.

#### 1.0.9

 * Added: changelog.txt file for WooCommerce Marketplace submission.
 * Tweak: Ensured compliance with WooCommerce submission requirements.

#### 1.0.8

 * Added: Changelog section to readme.txt for WooCommerce Marketplace submission.
 * Tweak: Updated documentation for clarity.

#### 1.0.7

 * Fixed: Improved compatibility with WooCommerce 9.0.
 * Added: Support for variable product pricing per user role.
 * Tweak: Optimized debug logging for better performance.

#### 1.0.6

 * Added: Category restriction option for role-based pricing.
 * Fixed: Bug in Quick Edit pricing for specific user roles.

#### 1.0.5

 * Added: Crash Handling.
 * Fixed: This plugin won’t crash anymore if the required packages are not installed
   but simply warn the user.

#### 1.0.4

 * Added: Dynamic Translation.

#### 1.0.3

 * Added: Translation.

#### 1.0.2

 * Fixed: Better Category Handling.

#### 1.0.1

 * Added: New Style.

#### 1.0.0

 * Added: First version.

## Meta

 *  Verze **1.2.2**
 *  Poslední aktualizace **před 2 týdny**
 *  Aktivních instalací **40+**
 *  Verze WordPressu ** 5.0 nebo novější **
 *  Testováno až do WordPressu **6.9.4**
 *  Verze PHP ** 7.4 nebo novější **
 *  Jazyk
 * [English (US)](https://wordpress.org/plugins/simple-role-based-pricing/)
 * Štítky
 * [discounts](https://cs.wordpress.org/plugins/tags/discounts/)[Role based pricing](https://cs.wordpress.org/plugins/tags/role-based-pricing/)
   [user roles](https://cs.wordpress.org/plugins/tags/user-roles/)[woocommerce](https://cs.wordpress.org/plugins/tags/woocommerce/)
 *  [Podrobnosti](https://cs.wordpress.org/plugins/simple-role-based-pricing/advanced/)

## Hodnocení

Zatím nebyly zadány žádné recenze.

[Your review](https://wordpress.org/support/plugin/simple-role-based-pricing/reviews/#new-post)

[Zobrazit všechny recenze](https://wordpress.org/support/plugin/simple-role-based-pricing/reviews/)

## Spolupracovníci

 *   [ Thomas Lloancy ](https://profiles.wordpress.org/tlloancy/)

## Podpora

Potřebujete pomoc?

 [Fórum podpory](https://wordpress.org/support/plugin/simple-role-based-pricing/)