With Give activated, Purchasing and creating an account with WooCommerce forces the customer login after purchase
WooCommerce customer flow should not be impacted by Give in any way.
If you have Give activated and WooCommerce, then when purchasing and creating an account, the customer is automatically logged in after purchase. This is not the default behavior of WooCommerce, customers.
Note that I also attempted to disable the Give autologin function via the filter provided:
add_filter('give_log_user_in_on_register', 'give_dont_auto_login');
function give_dont_auto_login() {
return false;
}
This filter works as expected for Give forms, but has no impact on the WooCommerce autologin described above.
Steps to Reproduce above.@DevinWalker @mathetos @kevinwhoffman I've investigated more into the issue and created a video.
https://drive.google.com/open?id=1Quxk4lDq-kmNzvYmvxit8amRSXGx4w_y
Let me know your thoughts.
Nice Video and Finding @mehul0810
Totaly agreed with you
One thing we should hide the admin bar tools too in Give Core When the user has Give Donor Role
I'm not so sure we should hide the admin bar. Why does Woo hide it anyways?
@DevinWalker It's not about hiding the Admin bar, it's that Woo customers are NOT auto-logged-in after purchase. But when Give is active they ARE logged in. That shouldn't happen.
EDIT: I missed @mehul0810 's video above. I understand now what he's saying. We shouldn't touch the admin bar visibility in any way IMHO.
I don't know, in my tests, I was still logged in after purchase without Give active, I just was not able to see the black bar, and wp-admin redirected to my-account on the front end.
I tested again, and inspected the dom after purchase with Give NOT activated. I believe that WooCommerce is NOT logging their customers in, but similarly to our "Guest Donations" feature, they are showing that information based on sessions, not an actual login. So the issue still remains that Woo does NOT log their customers in, but when Give is active they DO get logged in.
I think it's worth inspecting the Give functions that do the auto-login to ensure we're not stepping on the toes of other popular plugins.
See the code issue via my video here: https://goo.gl/BTf7pv
I realized I didn't explain _why_ we need these two filters in our plugin so I made another video explaining that here: https://goo.gl/6CBLRi
Most helpful comment
Resolved:
See the code issue via my video here: https://goo.gl/BTf7pv
I realized I didn't explain _why_ we need these two filters in our plugin so I made another video explaining that here: https://goo.gl/6CBLRi