mycred_scratch_everyonewins

Description

By default, a scratch card set must consist of cards that represents a “win” and cards that represents “no wins”. This filter can be used to change this and create sets where all cards are winners. Without this filter, if you attempt to create zero “No Win” cards, the set will decline your request when you save.

Available since version 1.2

Parameters

Param Type Required Description
$allow bool Yes

TRUE to allow or FALSE. Defaults to FALSE.

$set_id int No

The card sets WordPress post ID.

Used By

Package Prio. Description
Not used by any built-in package.

Examples

Example 1: Enable all cards to be winning cards.

add_filter( 'mycred_scratch_everyonewins', '__return_true' );