Problem with purchase in my shop with woocommerce

This topic has 7 replies, 2 voices, and was last updated 1 months ago ago by Luca Rossi

  • Avatar: micelion
    micelion
    Participant
    April 22, 2024 at 17:14

    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;

    }

    Please, contact administrator
    for this information.
    6 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    April 23, 2024 at 06:21

    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

    Avatar: micelion
    micelion
    Participant
    April 23, 2024 at 09:08

    Thank you!

    I send you the video so you can solve it for me

    Please contact administrator
    for this information.
    Avatar: Justin
    Luca Rossi
    Support staff
    April 23, 2024 at 10:06

    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

    Avatar: micelion
    micelion
    Participant
    April 23, 2024 at 10:21

    Yes!

    Avatar: micelion
    micelion
    Participant
    April 23, 2024 at 15:51

    something new?

    Thanks!

    Avatar: Justin
    Luca Rossi
    Support staff
    April 24, 2024 at 04:45

    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

  • Viewing 7 results - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.