Fortune Wheel
Estimated reading: 2 minutes
myCred Fortune Wheel
myCred Fortune Wheel is a gamification Add-on which attracts visitor of your site and gives them a chance to spin the fortune wheel where they will be awarded by points. It is a different way to offer points to your customers. Fortune Wheel can appear on any page of your WordPress site. Users can play a spin once they visit on your site depend on your wheel settings.
Features
Features | Description |
---|---|
Set unlimited Slices | There are two kinds of wheel slices (1. No Prize 2. Win Prize) . You have the power to set unlimited slices of your wheel with the priority based which mean you can easily control which slice you would like to stop most. |
Full Control Over Layout | You have full control over the layout of myCred Fortune Wheel. You can easily customize the colors labels and everything which you like. |
Offer Free Spin | myCred fortune wheel has the ability to offer free spins for your customers. You can set the free spin limit from the wheel settings. |
Shortcode Support | You can place a fortunewheel shortcode in a page to display wheel on any place of the page. |
Display On Specific Page | myCred Fortune wheel has the option to set on which page you would like to appear on your site. You can set all pages or a specific page. |
Available Shortcode
[fortunewheel wheel_id=123]
Shortcode Attributes
Attribute | Type | Required | Default | Description |
---|---|---|---|---|
wheel_id | INT | Yes | – | Fortune Wheel ID. |
Timeframe
Argument | Description |
---|---|
$timeframe | Supported keywords: today , yesterday , thisweek and thismonth . |
Example: Change free spin timeframe 1 day to 1 month.
add_filter( 'mycred_fortunewheel_free_spin_timeframe', 'mycred_fortunewheel_free_spin_once_month', 10, 1 );
function mycred_fortunewheel_free_spin_once_month( $timeframe ) {
// available timeframe = today, week and month
$timeframe = 'thismonth';
return $timeframe;
}
Spin Result
Argument | Description |
---|---|
$result | Hook your custom event after spinning (return: “count_wins” or “count_loss”). |
Example: Add your own hook after spin.
add_action('mycred_fortunewheel_after_spin', 'mycred_fortunewheel_spin_result', 10, 1);
function mycred_fortunewheel_spin_result( $result ) {
if( $result == 'count_wins' ) {
// do something after win
}
if( $result == 'count_loss' ) {
// do something after loss
}
}