VidYen / VidYen-WordPress-Plugins

VidYen Plugins for WordPress
GNU General Public License v2.0
9 stars 2 forks source link

Important issue with raffle #107

Closed mcdeimon closed 5 years ago

mcdeimon commented 5 years ago

When you buy a ticket and update the page you automatically buy another ticket even if you do not press the buy button.

mcdeimon commented 5 years ago

Hello Felty,

It seems that I have solved this by adding these lines in the file "vypstr.php" line "333"

$new_url = add_query_arg( 'success', 1, get_permalink() ); wp_redirect( $new_url, 303 );

Now if you reload the page, you do not buy a ticket automatically again.

VidYen commented 5 years ago

This has been fixed. Added the count check to make sure the post was on the same count as the actual game.

mcdeimon commented 5 years ago

Now another problem has appeared. When a user purchases a ticket and the page is reloaded, if the user presses the button again to buy a second ticket, the page is reloaded but the purchase is not made. You have to press a third time to buy the second ticket.