Use code "BFCM22" "BFCM22" "BFCM22" to Get 22% OFF

myCred Lottery 1.2.2 now available

The myCred Lottery add-on has been updated to version 1.2.2 and is now available for download. If you are not receiving an update in your WordPress admin area please check that you have setup your license on the website.

Updating the plugin:

The following update guide is only applicable if you have a recurring lottery scheduled. If you are only running Manual lotteries without a schedule you can disregard this.

  1. Go to the Lotteries > All Lotteries page and edit each active lottery you have.
  2. In the “Publish” metabox check that each lottery state has a date scheduled. If it does not have, scroll down to the “Schedule” metabox and tick the “Reschedule Lottery” checkbox then click on the blue “Update” button. Your lottery should now be scheduled in again.

Included fixes:

  • Rewrote how costs are calculated via Javascript when playing.
  • Fixed cancel and refund button issue.
  • Fixed scheduling issue for recurring lotteries.
  • Fixed last of the month schedule.
  • Adjusted play.js to allow HTML in results messages.

New Features:
New Menu

In 1.2.2 I have moved the Lottery menu from myCred > Lottery to it’s own menu. Here you can view / create lotteries along with viewing all lottery entires. If the lottery is in the start position you can also refund / delete entries directly from this page.


As of 1.2.2 you can now re-schedule any lottery that is currently active. You can use this to change when the lottery runs or resolve issues where schedules are missing in the WP Cron.
When editing a lottery, you will notice that the Schedule metabox is visible but all values are disabled if the lottery is active.
I have added in a new checkbox which when selected allows you to change the schedule. If you click “Update” while this checkbox is selected, the lottery will delete any WP Cron Schedules for this lottery and re-add them based on your schedule settings.
The Schedule list in the Publish metabox has also been updated to show the scheduled WP Cron dates. If a schedule is missing, this will be clearly visible here allowing you to take action.

New Shortcode: mycred_lottery_quickpick

This shortcode allows users to buy x number of entries / number picks for x price for any lottery. You can use this shortcode to for example give special price for users who enter a recurring lottery for 10 draws or just create a quick button that picks random numbers for your users to play. Note that users clicking on this button will be charged unless you set it to be free.
Example: Quickpick 5 sets of numbers for a “pick numbers” lottery with the ID 1. No repeat.

[mycred_lottery_quickpick id="1" entries="5"]Quickpick[/mycred_lottery_quickpick]

Example: Quickpick 1 entry for the next 10 draws for the lottery with the ID 2.

[mycred_lottery_quickpick id="2" entries="1" draws="10"]Quickpick for 10 Draws[/mycred_lottery_quickpick]

Example: Quickpick 1 entry for the next 10 draws with the custom price of 5 points.

[mycred_lottery_quickpick id="2" entries="1" draws="10" cost="5"]Quickpick 10 weeks for 5 Points[/mycred_lottery_quickpick]

You can find all available shortcode attributes and further examples in the myCred Codex.

New customisation: Adjust the point type for payouts

The new mycred_lotto_payout_type filter allows you to payout users in a different point type then they used to enter the lottery. Only usable if you have multiple point types setup.
Example: Payout in the point type that has the metakey “mytype”.

add_filter( 'mycred_lotto_payout_type', 'adjust_mycred_lottery_payouttype' );
function adjust_mycred_lottery_payouttype( $type ) {
	return 'mytype';

Added support for Badges

The lottery add-on will now add in all lottery references in the badge editor if you want to create badges based on users lottery plays / wins.

Added support for Email Notification

The lottery add-on will now add in the lottery instances into email notice setups allowing you to send users emails when they play / win / get refunded.


Share on facebook
Share on twitter
Share on linkedin