Redirect to home page instead of my account after login

Solved4 replies3 participantsUpdated by Tony Rodriguez

  • Avatar: islam
    islam
    Participant

    Hi,

    I’ve opened a ticket before regarding this issue, and you tried to change the redirect using woocommerce hook/filter but it didn’t work and I was advised to check the installed plugins suspecting the redirection is forced from one of them, but actually I’ve found the redirection is implemented in xstore code, I wonder if you could change it in next releases or make it configurable!

    kindly check the file and code in:
    themes/xstore/framework/woo.php
    if ( !function_exists(‘etheme_woocommerce_force_proper_login_redirect’) ) {
    $redirect = wc_get_page_permalink( ‘myaccount’ ) . ‘?logged_in=’ . time() . ‘&nocache=’ . uniqid();

    Best Regards,
    Islam

    Please, contact administrator
    for this information.

    4 Answers

    Avatar: Jack Richardson
    Jack Richardson
    Support staff

    Dear @islam,

    It is not permitted to modify the code directly in the parent theme, as these changes will be overwritten with the next update. As you can see, many functions and the current function has a wrapper with “if (!function_exists)”. You can copy the inner content (inside the condition) to your child theme’s functions.php file and implement the modifications there. For more details, please visit: https://developer.wordpress.org/themes/advanced-topics/child-themes/.

    Best regards,
    Jack Richardson
    The 8Theme’s Team

    Avatar: islam
    islam
    Participant

    Perfect thanks Jack.

    Avatar: islam
    islam
    Participant

    Thanks for the support! My topic “Redirect to home page instead of my account after login” has been successfully resolved.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff

    Dear islam,

    We really appreciate your time and engagement within the WordPress & WooCommerce community

    Your feedback drives every improvement we make in XStore — helping us deliver a smoother and more flexible experience with each update.

    Your input makes a real difference.

    Topic closed.
    The 8Theme Team

The issue related to '‘Redirect to home page instead of my account after login’' has been successfully resolved, and the topic is now closed for further responses