This topic has 7 replies, 2 voices, and was last updated 6 months, 3 weeks ago ago by Luca Rossi
When a user is new and puts a product in the cart and goes to
finalize purchase, finalizing purchase gives an error and the purchase is not made
purchase (but the new user is generated), when you press a second time
After completing the purchase, the purchase is completed correctly.
To avoid this error we have included a code fragment that when
You click on checkout and it redirects you to the login page.
or registration, and once you have logged in or registered, you will
It redirects back to checkout and works correctly.
We want a new and unregistered user to be able to finish the
purchase and create your user at the same time without any
mistake
The code entered to patch this is:
add_action(‘template_redirect’, ‘woocommerce_custom_redirections’);
function woocommerce_custom_redirections() {
if ( !is_user_logged_in() && is_checkout() )
wp_redirect( get_permalink(
get_option(‘woocommerce_myaccount_page_id’) ) );
}
// LOG REDIRECTION
add_filter(“woocommerce_registration_redirect”, “wcs_register_redirect”);
function wcs_register_redirect($redirect) {
$redirect = “https://miceliongames.com/finalizar-compra/”;
return $redirect;
}
// LOGIN REDIRECTION
add_filter(“woocommerce_login_redirect”, “wcs_register_login”);
function wcs_register_login($redirect) {
$redirect = “https://miceliongames.com/finalizar-compra/”;
return $redirect;
}
Dear @micelion,
We regret to hear that you are experiencing issues with finalizing your purchase on our platform. To assist you more effectively, could you kindly provide us with screenshots or videos that capture the error you encountered?
Thank you for your cooperation.
Best regards,
The 8Theme Team
Thank you!
I send you the video so you can solve it for me
Dear @micelion,
We hope this message finds you well. We would like to inform you that we have been unable to reproduce the issue you reported on our local sites.
To further investigate and identify any potential conflicts, may we have your permission to temporarily disable all third-party plugins on your site?
Thank you for your cooperation.
Best Regards,
The 8Theme Team
Yes!
something new?
Thanks!
Dear @micelion,
We hope this message finds you well.
Upon deactivating all third-party plugins and sequentially activating the plugins listed at the following link: https://prnt.sc/0azt5KQgRq09, we observed that the checkout process functioned without any issues.
To identify the specific plugin causing the conflict, we recommend disabling the third-party plugins one at a time and testing each one individually.
Should you require further assistance or have any questions, please do not hesitate to contact us.
Best regards,
The 8Theme Team
You must be logged in to reply to this topic.Log in/Sign up