• Resolved tobilotta

    (@tobilotta)


    The Button Position showes up in between other buttons in the user “my account area”. i want the delete button to show at the end of the button list.!

    how to achive?

    check this screenshot: https://ibb.co/88r7mC9

    THX

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Sanjeev Aryal

    (@sanzeeb3)

    Hi @tobilotta,

    Thanks for reaching out. I agree the button should be at the end of all menu items. I’ll make a note to improve this in future updates.

    In the meantime, if you’d like to you can accomplish this with a little custom code:

    add_filter( 'woocommerce_account_menu_items', function( $items ) {
    
            $delete_menu = $items['wpf-delete-account'];
    
            unset( $items['wpf-delete-account'] );
    
            $items['wpf-delete-account'] = $delete_menu;
    
        return $items;
    }, 10, PHP_INT_MAX );

    Here’s how to easily add custom codes like that.

    I hope this helps!

    Thread Starter tobilotta

    (@tobilotta)

    i just added the code to theme code ditor functions.php, deleted cache and it does still show in the middle of the buttons.

    Plugin Author Sanjeev Aryal

    (@sanzeeb3)

    @tobilotta – what plugin is adding those tabs “Communication” and “Abmelden”?

    Plugin Author Sanjeev Aryal

    (@sanzeeb3)

    @tobilotta – oh, it should be:

    add_filter( 'woocommerce_account_menu_items', function( $items ) {
    
            $delete_menu = $items['wpf-delete-account'];
    
            unset( $items['wpf-delete-account'] );
    
            $items['wpf-delete-account'] = $delete_menu;
    
        return $items;
    }, PHP_INT_MAX );

    Use this custom code instead.

    I hope this helps!

    Thread Starter tobilotta

    (@tobilotta)

    thank you very much, this helped! can you pls tell me if the code will stay saved in “functions.php” even after Theme / WP-Update?

    and what if i get more items in the list, is there something in the code i have to change in order to get the “delete” button showing at the end of the list ?

    thanks

    Plugin Author Sanjeev Aryal

    (@sanzeeb3)

    @tobilotta – If you have added in your theme’s functions.php – yes the code will be wiped on theme update. So, it is preferred to create and use in child theme’s functions.php or use plugins such as “Code Snippets” to add such custom code. You can follow this tutorial: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/

    This issue will be fixed in upcoming WP Frontend Delete Account. If you’re comfortable in editing plugin files, here’s how to fix this: https://github.com/sanzeeb3/wp-frontend-delete-account/issues/36. This way, you don’t need to add custom code snippet provided above and you don’t need to worry about updates.

    You don’t need to change anything – the ‘Delete Account’s will be added in the last even if you added other items.

    I hope this helps!

    Plugin Author Sanjeev Aryal

    (@sanzeeb3)

    Hey, version 1.5.6 is supposed to fix this issue without any custom codes. So I’m making the issue as resolved.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Position of Button’ is closed to new replies.