Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove "Paypal payments" tab from My Account in Woocommerce

The Woocommerce Paypal Payments plugin adds a "Paypal payments" tab on the Woocommerce My Account page. How do I remove this tab entirely?

I have tried this snippet modified from one found here but was unsuccessful in removing the tab.

add_filter ( 'woocommerce_account_menu_items', 'misha_remove_my_account_links' );
function misha_remove_my_account_links( $menu_links ){
        
  unset( $menu_links['ppcp-paypal-payment-tokens'] );
        
  return $menu_links;
        
}
like image 936
tinyiguanas Avatar asked Nov 18 '25 19:11

tinyiguanas


1 Answers

You're on the right track! That plugin adds that tab on priority of 40. So, you could add a filter on a higher priority, let's say 50, like this:

add_filter('woocommerce_account_menu_items', 'misha_remove_my_account_links', 50);

function misha_remove_my_account_links($menu_links)
{

    unset($menu_links['ppcp-paypal-payment-tokens']);

    return $menu_links;
}

And poof! That extra tab is gone!

enter image description here

like image 173
Ruvee Avatar answered Nov 21 '25 10:11

Ruvee



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!