Home › Forums › UM Switcher › Changing user status before order is completed
- This topic has 10 replies, 4 voices, and was last updated 7 years, 2 months ago by Helen (staff).
-
AuthorPosts
-
-
at #82188roosallesMember
Hi,
When testing it with Woocommerce I noticed that the user role is being changed BEFORE the actual payment is confirmed, actually, it’s being changed right after the UM-Switch data is inserted into the plugin’s custom table.
I am not sure if that’s the correct behavior of the plugin, but when an order is still set as “On Hold” it does not mean it was confirmed or paid.In my case and any other cases where you’re selling digital products (for download), you will have a big problem because the user will have access to the content (right after he’s got his level changed before the order/payment is confirmed).
I didn’t spend much time inspecting the code and am not sure if this has something to do with the problem, but, checking the code, I’ve found this:
(file refresh_cron_job.php, line 375):
... }else{ if($order_status == 'wc-completed' || $order_status == 'wc-on-hold'){ um_fetch_user( $user_id ); $ultimatemember->user->set_role($loop['selectbefore']); }else{ um_fetch_user( $user_id ); $ultimatemember->user->set_role($loop['selectbefore']); } }
I might not be seeing this correctly, and please let me know if I am wrong, but what’s the point of having an if/else statement with the exact same logic inside each of them?
Thanks
PS. I wrote my review based on the experience I had. For some reason, I was not able to access Theme Dutch website in order to describe the problem, until today.
-
at #82190Roy PepitoModerator
Hi,
Looks like you’re using the outdated version of Umswticher. Attached is the updated one.
Recently we just updated the plugin by adding an auto complete order. This is happening when an order is successfully completed using paypal otherwise the status is set to on-hold.
In our new version the logic is defirent from the code that you mentioned on your comment…please see below:
if($order_status == ‘wc-pending’ || $order_status == ‘wc-on-hold’ || $order_status == ‘wc-processing’ || $order_status == ‘wc-failed’ || $order_status == ‘wc-refunded’ || $order_status == ‘wc-cancelled’){
um_fetch_user( $user_id );
$ultimatemember->user->set_role($loop[‘selectafter’]);}else{
um_fetch_user( $user_id );
$ultimatemember->user->set_role($loop[‘selectbefore’]);
}Thanks
-
at #82192Roy PepitoModerator
By the way, this new version requires a default custom role for on-hold. Please see attached screenshot for your guide. This is the area where you’re able to set a limit to your member and assign only specific functions that they can access while their order status is on-hold.
Thanks
Attachments:
-
at #82195adminKeymaster
Um switcher 2.0.9 is dismorning updated to Codecanyon, you will get a notice by email when It’s available for download from your CC dashboard.
Please keep us posted,
Thanks Mike -
at #82206Helen (staff)Keymaster
Hi Roosalles,
If you’re satisfied with our support now, please re-consider your 2-star rating on Codecanyon UM-Switcher.
Many thanks in advance!
Helen
-
at #82213roosallesMember
Hi,
Thanks, but that was the version I downloaded from Codecanyon upon finishing my purchase, so that shouldn’t be an outdated version. I am sorry, but it’s not my fault if I downloaded that on specifically.
In my case, creating a new role won’t work, since I still need my users to have all capabilities allowed for their current role, before switching the a Premium/Paid subscription role. Just changing the user role to “On Hold”, would affect directly what the users can and cannot do on the site, since they wouldn’t be part of either “Regular Member” or “Premium Member” role. Each of these roles have specific validation within the site. If a payment would take hours or even a few days to be confirmed, the user wouldn’t be able to use the site at all, because the whole logic considers these 2 roles for validating access to premium content, specific search filters and other features.
I’d expect the plugin to just change the role from Regular Member to Premium Member after order confirmation. This should be a simple thing to do but for some reason (that is still not clear to me), you’re forcing users to have another “intermediate” role (On-Hold) before switching them to Premium Member role.
I tried to edit my review on CodeCanyon for Customer Support, based on your responses here in the forum, but couldn’t find any way to edit it. Although I see your true efforts to fix the plugin, by creating the intermediate role and send me the updates here in the forum, I am sorry but I have to say that I still not happy with the plugin and it doesn’t have anything to do with Customer support, which seems to be great. But my problem still persists and trying to solve the way you suggested, by creating a new On Hold role, would cause much more problems on the site that you can imagine. So I don’t know what else to do.
Thanks
-
at #82214Roy PepitoModerator
Hi Roosalles,
Can we ask for the login please?
Thanks
-
at #82215roosallesMember
It’s not problem giving you access but I am not sure this thread can be viewed by other users, so I don’t know how can I send you the credentials.
Please send me an email roosalles@gmail.com and I will forward the credentials.
Thanks -
at #82216roosallesMember
Or, if you prefer, just add here an email address which I can use to send you the info.
-
at #82217adminKeymaster
Send us a ticket Below HELPDESK
-
at #82232Helen (staff)Keymaster
Hi Roosalles,
Last week we offered you to ‘send a ticket’ via HELPDESK on our website so you could leave your credentials. We’ve received no response yet. Does it mean your issues are resolved?
Please reconsider your 2-star rating on Codecanyon for support, since we do our best to support you.
Thanks in advance for your effort!
Helen
-
-
AuthorPosts
- You must be logged in to reply to this topic.