How to disable the “Upgrade or Downgrade” button in “My account” of WooCommerce Subscriptions
I have found/made the code that works. Maybe it helps somebody else. /** * Remove the “Upgrade or Downgrade” button from the My Subscription table if user role is “subscriber_plus”. */ add_filter(‘woocommerce_subscriptions_switch_link’, ‘remove_switch_button’, 10, 4); function remove_switch_button($switch_link, $item_id, $item, $subscription) { $user = wp_get_current_user(); if ( in_array( ‘subscriber_plus’, (array) $user->roles ) ) { return ”; … Read more