Support » Plugin: myCred - Points, Rewards, Gamification, Ranks, Badges & Loyalty Plugin » Woocommerce logout confirmation is not working, after installing myCred

  • Resolved taxlawmen

    (@taxlawmen1)


    Hi,

    Let me tell you the problem that happened to me.

    1. I’m using a woocommerce login.
    2. I used the code below to avoid using the logout confirmation message.

    function iconic_bypass_logout_confirmation() {
    global $wp;

    if ( isset( $wp->query_vars[‘customer-logout’] ) ) {
    wp_redirect( str_replace( ‘&’, ‘&’, wp_logout_url( wc_get_page_permalink( ‘/’ ) ) ) );
    exit;
    }
    }

    add_action( ‘template_redirect’, ‘iconic_bypass_logout_confirmation’ );

    3. However, after installing myCred, I confirmed that this code is not working. (If myCred is disabled, the code will operate normally.)
    4. Can you tell me how to solve it?

    Thank you.

    • This topic was modified 1 year, 9 months ago by taxlawmen.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author WPExperts.io

    (@wpexpertsio)

    Hi @taxlawmen1,

    We recommend you to increase your action hook priority.

    Forexample:

    add_action( ‘template_redirect’, ‘iconic_bypass_logout_confirmation’, 20 );

    Most probably your issue will be resolved by adding this, If you still have an issue please let us know.

    Thread Starter taxlawmen

    (@taxlawmen1)

    Hi,
    Thank you for your answer.
    Sadly, it didn’t work.
    I tested various numbers from 1 to 20, but it didn’t work.
    Is there any other way?

    Plugin Author WPExperts.io

    (@wpexpertsio)

    Hi,
    Can you please share your website URL so we check the console.

    Thread Starter taxlawmen

    (@taxlawmen1)

    Thank you.
    I’m restricting access to countries for security.
    If you do not have access to my site, please let me know the country you are approaching.
    I will temporarily allow the country
    Thanks again.

    URL: https://semumana.com

    Plugin Author WPExperts.io

    (@wpexpertsio)

    Are you using a Custom Developed theme please share the details of your theme also if you are using some plugin for login functionality please list it here?

    Thread Starter taxlawmen

    (@taxlawmen1)

    I am using Mylisting theme.
    (https://themeforest.net/item/mylisting-directory-listing-wordpress-theme/20593226)
    The login is using woocommerce and is modal by the theme.
    Therefore, no separate plugin was installed for login.

    Plugin Author WPExperts.io

    (@wpexpertsio)

    Hi @taxlawmen1,
    Can you please try the priority as “59999” as mentioned in the below code.

    add_action( ‘template_redirect’, ‘iconic_bypass_logout_confirmation’, 59999 );

    Plugin Author WPExperts.io

    (@wpexpertsio)

    This thread has been marked as resolved due to lack of activity.

    You’re always welcome to open a new topic.

    Thanks for understanding!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Woocommerce logout confirmation is not working, after installing myCred’ is closed to new replies.