Guest customers can’t pay, getting “Developers:” error message in 3.05
-
Have updated recently the store of a client to the latest woo and stripe gateway files. Found out today that GUEST customers (customers not logged in) are not able to complete payment because the following error shows:
“Developers: Please make sure that you are including jQuery and there are no JavaScript errors on the page.”
I have dutifully checked and there are neither JS errors nor is JQuery missing. I have searched through the code for this plugin, before that error message I can see…
$source = $this->get_source( get_current_user_id(), $force_customer );
if ( empty( $source->source ) && empty( $source->customer ) ) { I have output the "$force_customer" variable and can see it's false, and have output the effects of the "get_source" funciton and can see it's returning false on all counts. The problem, clearly, is that you seem to require the person to be logged in using "get_current_user_id()" in order to ascertain their ID, of which they will have none if they are a guest customer. In a previous version of this plugin the code looked much more setup for dealing with guest accounts
$customer_id = is_user_logged_in() ? get_user_meta( get_current_user_id(), ‘_stripe_customer_id’, true ) : 0;
if ( ! $customer_id || ! is_string( $customer_id ) ) {
$customer_id = 0;
}
At no point in the 3.0.5 plugin is there any form of check to make sure that the person is not logged in.
Am I missing something here with regards to how you’re choosing to handle guest customers? Or is it now a feature that you must be logged in to be able to pay via this Stripe Gateway plugin? I’m not entirely sure how much money our client has lost because of this, it would have been nice to know it was going to be a change from the functionality of its 2.6 iteration, but if it is a bug then do you have an estimate on how long it’ll take to resolve this problem?
- The topic ‘Guest customers can’t pay, getting “Developers:” error message in 3.05’ is closed to new replies.