• Resolved bulls_shark

    (@bulls_shark)


    Hello, I found a code here where you can make the option available to customers on the my-account account.

    After activation, I can only scan the code, then I log out and want to log in. After I have entered the code, it sends me back to the login page. What’s there?

    And can the option also be included in the My Account menu and not under profile details?

    Thanks for the support

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author David Anderson

    (@davidanderson)

    > After I have entered the code, it sends me back to the login page. What’s there?

    Does the same happen if you first de-activate all other plugins (except WooCommerce) and switch to a default theme?

    > And can the option also be included in the My Account menu and not under profile details?

    No, there’s currently no code for that.

    David

    Thread Starter bulls_shark

    (@bulls_shark)

    Hello I only had Woocommerce running and I’m using Themeforest’s postage.

    I sent the displayed QR code, clicked it to activate it, saved it and that’s it.

    When I wanted to log in and entered the 6-digit code, I was not reloaded to my account page but to the (login) page.

    Will still test it vl is the error somewhere else.

    It’s a shame that you don’t have a code yet so that you can display the whole thing as an extra point under My Account.

    Thanks for the support! Really top the quick answer.

    Plugin Author David Anderson

    (@davidanderson)

    What kind of login form are you using? The one built into WooCommerce, or one from your theme, or something else?

    Thread Starter bulls_shark

    (@bulls_shark)

    Hello from Woocommerce my-account. I will still play and give feedback today 🙂 Thanks

    Thread Starter bulls_shark

    (@bulls_shark)

    Hello, it is comsich now after I reinstalled the plugin, it works.

    What I noticed is that the “Current one-time password” is displayed under Two Factor Authentication – Save Settings. Shouldn’t that be hidden in the background? The private key is then displayed to the user under Setting Up. I only know that I have to scan the QR code to activate the one-time password. That’s why I’m asking so stupidly here. Excuse me.

    Thanks for the support and look forward to new updates, for example. Show 2Step in My-Account in the sidebar.

    Great plugin!

    Plugin Author David Anderson

    (@davidanderson)

    > Shouldn’t that be hidden in the background?

    Why’s that? It’s not a secret to someone who is already logged in (and changes every 30 seconds).

    David

    Thread Starter bulls_shark

    (@bulls_shark)

    Hello this code works very well

    /**
     * @snippet       WooCommerce How To Add New Tab @ My Account
     * @how-to        Watch tutorial @ https://techiesandesh.com
     * @author        Sandesh Jangam
     * @compatible    WooCommerce 3.6.2
     * @donate $7     https://www.paypal.me/SandeshJangam/7
     */
      
    /**
     * 1. Register new endpoint slug to use for My Account page
     */
    
    /**
     * @important-note	Resave Permalinks or it will give 404 error
     */
    function ts_custom_add_premium_support_endpoint() {
        add_rewrite_endpoint( 'premium-support', EP_ROOT | EP_PAGES );
    }
      
    add_action( 'init', 'ts_custom_add_premium_support_endpoint' );
      
      
    /**
     * 2. Add new query var
     */
      
    function ts_custom_premium_support_query_vars( $vars ) {
        $vars[] = 'premium-support';
        return $vars;
    }
      
    add_filter( 'woocommerce_get_query_vars', 'ts_custom_premium_support_query_vars', 0 );
      
      
    /**
     * 3. Insert the new endpoint into the My Account menu
     */
      
    function ts_custom_add_premium_support_link_my_account( $items ) {
        $items['premium-support'] = 'Premium Support';
        return $items;
    }
      
    add_filter( 'woocommerce_account_menu_items', 'ts_custom_add_premium_support_link_my_account' );
      
      
    /**
     * 4. Add content to the new endpoint
     */
      
    function ts_custom_premium_support_content() {
    	echo '<h3> Zwei-Faktor-Authentifizierung</h3>';
    	
    	echo do_shortcode( '[twofactor_user_settings]' );
    }
    
    /**
     * @important-note	"add_action" must follow 'woocommerce_account_{your-endpoint-slug}_endpoint' format
     */
    add_action( 'woocommerce_account_premium-support_endpoint', 'ts_custom_premium_support_content' );
    Thread Starter bulls_shark

    (@bulls_shark)

    Unfortunately I cannot edit the post above so the error-free version is here

    /**
     * @snippet       WooCommerce How To Add New Tab @ My Account
     * @how-to        Watch tutorial @ https://techiesandesh.com
     * @author        Sandesh Jangam
     * @compatible    WooCommerce 3.6.2
     * @donate $7     https://www.paypal.me/SandeshJangam/7
     */
      
    /**
     * 1. Register new endpoint slug to use for My Account page
     */
    
    /**
     * @important-note	Resave Permalinks or it will give 404 error
     */
    function ts_custom_add_zwei_faktor_endpoint() {
        add_rewrite_endpoint( 'zwei-faktor', EP_ROOT | EP_PAGES );
    }
      
    add_action( 'init', 'ts_custom_add_zwei_faktor_endpoint' );
      
      
    /**
     * 2. Add new query var
     */
      
    function ts_custom_zwei_faktor_query_vars( $vars ) {
        $vars[] = 'zwei-faktor';
        return $vars;
    }
      
    add_filter( 'woocommerce_get_query_vars', 'ts_custom_zwei_faktor_query_vars', 0 );
      
      
    /**
     * 3. Insert the new endpoint into the My Account menu
     */
      
    function ts_custom_add_zwei_faktor_link_my_account( $items ) {
        $items['zwei-faktor'] = 'Zwei-Faktor-Authentifizierung';
        return $items;
    }
      
    add_filter( 'woocommerce_account_menu_items', 'ts_custom_add_zwei_faktor_link_my_account' );
      
      
    /**
     * 4. Add content to the new endpoint
     */
      
    function ts_custom_zwei_faktor_content() {
    	echo '<h3>Zwei-Faktor-Authentifizierung</h3>';
    	
    	echo do_shortcode( '[twofactor_user_settings]' );
    }
    
    /**
     * @important-note	"add_action" must follow 'woocommerce_account_{your-endpoint-slug}_endpoint' format
     */
    add_action( 'woocommerce_account_zwei-faktor_endpoint', 'ts_custom_zwei_faktor_content' );
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Woocommerce’ is closed to new replies.