Simple Role Based Pricing

Description

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:
    • 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.
  2. Category Restrictions:
    • 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.
  3. Per-Product Pricing:
    • 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“`

Screenshots

Installation

  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.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Simple Role Based Pricing” is open source software. The following people have contributed to this plugin.

Contributors