Title: Coupons by Role
Author: sirrahikkala
Published: <strong>20. december, 2017</strong>
Last modified: 1. oktober, 2026

---

Søg plugins

![](https://ps.w.org/woo-coupons-by-role/assets/banner-772x250.png?rev=1789935)

![](https://ps.w.org/woo-coupons-by-role/assets/icon-256x256.png?rev=1789935)

# Coupons by Role

 Af [sirrahikkala](https://profiles.wordpress.org/sirrahikkala/)

[Download](https://downloads.wordpress.org/plugin/woo-coupons-by-role.zip)

 * [Detaljer](https://da.wordpress.org/plugins/woo-coupons-by-role/#description)
 * [Vurderinger](https://da.wordpress.org/plugins/woo-coupons-by-role/#reviews)
 *  [Installation](https://da.wordpress.org/plugins/woo-coupons-by-role/#installation)
 * [Udvikling](https://da.wordpress.org/plugins/woo-coupons-by-role/#developers)

 [Support](https://wordpress.org/support/plugin/woo-coupons-by-role/)

## Beskrivelse

Coupons by Role plugin allows administrators to hide coupon field and button from
the Woocommerce cart page for each group/role and optionally show text instead. 
This plugin is useful when you use role based pricing plugins since they do not 
discount prices with woocommerce functions and in those cases Woocommerce allows
double discount where role based price and coupon can be stacked.

Supports classic WooCommerce cart and checkout templates and the Cart and Checkout
blocks. Restricted roles cannot apply coupons through the Store API. Messages are
displayed as plain text. For users with multiple restricted roles, the first restricted
role in their role list determines the message.

## Skærmbilleder

[⌊Settings tab⌉⌊Settings tab⌉[

Settings tab

## Installation

 1. Upload the plugin folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. The plugin settings can be accessed via the ‘Woocommerce’, ‘Settings’ menu and “
    Coupons by Role” tab in the administration area (either your site administration
    for single-site installs, or your network administration for network installs).

## Anmeldelser

Der er ingen anmeldelser for denne widget.

## Bidragsydere & udviklere

“Coupons by Role” er open source-software. Følgende personer har bidraget til dette
plugin.

Bidragsydere

 *   [ sirrahikkala ](https://profiles.wordpress.org/sirrahikkala/)

[Oversæt “Coupons by Role” til dit eget sprog.](https://translate.wordpress.org/projects/wp-plugins/woo-coupons-by-role)

### Interesseret i udvikling?

[Gennemse koden](https://plugins.trac.wordpress.org/browser/woo-coupons-by-role/),
tjek [SVN repository](https://plugins.svn.wordpress.org/woo-coupons-by-role/), eller
abonner på [udviklerloggen](https://plugins.trac.wordpress.org/log/woo-coupons-by-role/)
via [RSS](https://plugins.trac.wordpress.org/log/woo-coupons-by-role/?limit=100&mode=stop_on_copy&format=rss).

## Ændringslog

#### 1.3.0

 * Added missing License and License URI metadata matching the existing GPLv3-or-
   later license.
 * Added WooCommerce Cart and Checkout block support, including hidden coupon forms
   and optional role messages.
 * Enforced coupon restrictions during Store API and AJAX requests, including direct
   coupon applications, while preserving ordinary administration tools.
 * Fixed classic cart message placement and retained messages after cart updates
   without relying on submit-button selectors or jQuery.
 * Fixed message selection for users with multiple roles by using the first restricted
   role in their role list.
 * Rendered messages as escaped plain text and removed inline JavaScript to safely
   handle quotes, line breaks, and HTML.
 * Ignored empty or malformed messages and malformed role settings.
 * Deferred translation loading to init and made role message labels translatable.
 * Improved role lookup while retaining compatibility with the declared minimum 
   WordPress version.
 * Declared WooCommerce as a plugin dependency and declared Cart and Checkout block
   compatibility.
 * Updated Tested up to to WordPress 7.1.2.
 * Added 26 regression checks, verified using PHP 8.5.11 and WordPress 7.1.2 hooks
   and escaping functions.

#### 1.2.1

 * Version bump and tested up-to data.

#### 1.2

 * Version bump and tested up-to data.

#### 1.1

 * Fixed plugin layout and descriptions.

#### 1.0

 * Initial release

## Meta

 *  Version **1.3.0**
 *  Senest opdateret **5 dage siden**
 *  Aktive installationer **10+**
 *  WordPress-version ** 4.1 eller højere **
 *  Testet op til **7.1.2**
 *  PHP-version ** 5.6 eller højere **
 *  Sprog
 * [English (US)](https://wordpress.org/plugins/woo-coupons-by-role/)
 * Tags
 * [coupon](https://da.wordpress.org/plugins/tags/coupon/)[group](https://da.wordpress.org/plugins/tags/group/)
   [role](https://da.wordpress.org/plugins/tags/role/)[woocommerce](https://da.wordpress.org/plugins/tags/woocommerce/)
 *  [Avanceret visning](https://da.wordpress.org/plugins/woo-coupons-by-role/advanced/)

## Bedømmelser

Der er endnu ikke indsendt nogen anmeldelser.

[Din anmeldelse](https://wordpress.org/support/plugin/woo-coupons-by-role/reviews/#new-post)

[Se alle anmeldelser](https://wordpress.org/support/plugin/woo-coupons-by-role/reviews/)

## Bidragsydere

 *   [ sirrahikkala ](https://profiles.wordpress.org/sirrahikkala/)

## Support

Har du noget at sige? Har du brug for hjælp?

 [Vis supportforum](https://wordpress.org/support/plugin/woo-coupons-by-role/)

## Donér

Vil du gerne støtte udviklingen af dette plugin?

 [ Donér til dette plugin ](https://www.paypal.me/couponsbyrole)