Hide the Package option in the user account menu

Hello,
I would like to use the listing packages to collect money (also with the Woocommerce plugin) for other services that I offer in my web, but not for setting the maximum listing number that a user can have.

So, would it be possible to generate a code snippet to unlink packages from the number of listings that the user has?
Therefore this snippet should also hide the Package option in the user account menu.

If this is not possible, alternatively it would be useful to have a code snippet that, at least, just hides the PAckage option in the user account menu (then, as I don’t want to limit the number of listings, I would set a maximum number of 999 listings, for example, and keep this Package option hidden).

Thank you very much and keep on with the excellent work you’re doing!

And this snippet should also hide the Package option in the user menu of the header.
Thank you again!

Hi,

Sorry, there’s no simple code snippet for this, it would require a custom implementation. If customizations beyond the available features are required for your site, please consider hiring someone for custom work https://fvrr.co/32e7LvY

To hide the Package option, please try this PHP snippet (How to add custom code snippets - HivePress Help Center):


add_filter( 
 'hivepress/v1/menus/user_account', 
 function($menu){
  if(isset($menu['items']['user_listing_packages_view'])){
   unset($menu['items']['user_listing_packages_view']);
  }
  
  return $menu;
 },
 1000
);
1 Like

It works perfectly.
Thank you very much for your quick answer!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.