VidYen / VidYen-WordPress-Plugins

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

Suggestion #119

Closed mcdeimon closed 5 years ago

mcdeimon commented 5 years ago

Hi Felty!

I added that line so that the balance is updated when the page is reloaded. I have the balance on the same page where the change is made. Without that line when the change is made the balance is not updated and it is necessary to reload the page.

if ($dash_move_result == 1){ $bal_update = vyps_balance_func( $atts ); $results_message = "Success. Crypto payout at: ". date('Y-m-d H:i:s');

I added it when the crypto exchange was confirmed but it would be good if it was added whenever a change is confirmed.

VidYen commented 5 years ago

Thanks! I'll take a look at it and see if it works for me.

VidYen commented 5 years ago

Hi, what part of the code uses $bal_update? I don't remember ever using the variable and so I searched and its not in the VYPS code.

VidYen commented 5 years ago

Can I get an update on this? I did not use $bal_update (normally I would use $balance_update)

Is this Dashed Slugs thing? Let me know where the variable is going otherwise it just breaks for me.

mcdeimon commented 5 years ago

Hi. No, that code only activates the function "vyps_balance_func ($ atts)" and that way the balance is updated. You can put whatever you want here "$ bal_update". Try putting this "$ bal_update = vyps_balance_func ($ atts);" on line 419 of vypspe.php, just after "if ($ dash_move_result == 1) {"

VidYen commented 5 years ago

Oh I see... Its just a dead end variable that just calls the function.

You got me confused... Next time put $(any variable) = vyps_balance_func($atts); so I don't look for a variable that doesn't exist ;)

I don't think I'd use $bal_update as I like to type out the full word and give it a descriptor. In this case I'd call it $call_function_variable or something like that... I feel there might be a better way to call a function without a variable maybe? I'm back in the office so I will be poking around the code today.

VidYen commented 5 years ago

@mcdeimon

I did a small update on the github version, but I moved some things around to adjust. Let me know if that works on your test clone of server. If so I will keep it.

VidYen commented 5 years ago

Ok. I pushed this out to official release. Let me know if it doesn't work or not.

VidYen commented 5 years ago

I moved a lot of files around so I'm afraid you'd have to look at github to see which ones I changed.

VidYen commented 5 years ago

I believe this should be closed as has been fixed (I think)