Filter
rpress_multiple_discounts_allowed
On this page
Filters whether multiple discount codes can be applied to one cart.
Applied in rpress_multiple_discounts_allowed(), which reads the allow_multiple_discounts option (default false). The result is cast to bool. When multiple discounts are not allowed, applying a new code replaces the existing one in rpress_set_cart_discount().
Parameters#
| Parameter | Type | Description |
|---|---|---|
$ret | bool | The value of the allow_multiple_discounts option. |
Return value#
bool. True to allow several discount codes in one cart.
Example#
function my_allow_multiple_discounts( $ret ) {
return true;
}
add_filter( 'rpress_multiple_discounts_allowed', 'my_allow_multiple_discounts' );
Source#
Applied in:
includes/discount-functions.php(line 922), inrpress_multiple_discounts_allowed()
See also#
Was this page helpful?
