Title: Code snippets conflict
Last modified: July 24, 2021

---

# Code snippets conflict

 *  Resolved [stepheniryna](https://wordpress.org/support/users/stepheniryna/)
 * (@stepheniryna)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/code-snippets-conflict/)
 * I used two of your code snippets, but they conflict and I need them to be combined.
 * The first is code for removing privacy and notifications tabs from the user profile.
 * The second is the snippet for adding a new tab in the user account page.
 * Snippets plugin wont let me use both at same time, in different snippets, because
   it calls the same function twice. Please help by making them one snippet.

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Rahul Gandhi](https://wordpress.org/support/users/wpdev10/)
 * (@wpdev10)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/code-snippets-conflict/#post-14700692)
 * Hi,
 * Can you please paste the code here or create a support ticket on [http://userswp.io/support](http://userswp.io/support)?
 * Regards,
    Patrik
 *  [jonny-s](https://wordpress.org/support/users/jonny-s/)
 * (@jonny-s)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/code-snippets-conflict/#post-14700807)
 * Please provide solution afterwards here, as I wish to do same…
 *  [Rahul Gandhi](https://wordpress.org/support/users/wpdev10/)
 * (@wpdev10)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/code-snippets-conflict/#post-14700850)
 * Hi,
 * Following is the code for removing invoices, subscriptions, billing address, 
   notifications, privacy menus from the account tab:
 *     ```
       add_filter('uwp_account_available_tabs', 'uwp_account_available_tabs_cb');
       function uwp_account_available_tabs_cb($tabs){
       	unset($tabs['gp-invoices']);
       	unset($tabs['gp-subscriptions']);
       	unset($tabs['gp-edit-address']);
       	unset($tabs['notifications']);    
       	unset($tabs['privacy']);
       	return $tabs;
       }
       ```
   
 * Please remove/modify your previous code related to this if you have. You can 
   remove the line from the code if you want to show any tab from the list.
 * Regards,
    Patrik
 *  [jonny-s](https://wordpress.org/support/users/jonny-s/)
 * (@jonny-s)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/code-snippets-conflict/#post-14700858)
 * And within `uwp_account_available_tabs_cb()` I can unset and register new tabs
   at the same time, right?
 *  [Rahul Gandhi](https://wordpress.org/support/users/wpdev10/)
 * (@wpdev10)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/code-snippets-conflict/#post-14700882)
 * Yes! But you will need other hooks as per the doc link I shared for displaying
   the content of the tab and title of the tab.
 * Regards,
    Patrik
 *  [jonny-s](https://wordpress.org/support/users/jonny-s/)
 * (@jonny-s)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/code-snippets-conflict/#post-14701891)
 * Got it. Thank you.
 *  Thread Starter [stepheniryna](https://wordpress.org/support/users/stepheniryna/)
 * (@stepheniryna)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/code-snippets-conflict/#post-14702089)
 * I’m the original poster here. This entire conversation between author and a third
   person happened before my workday started. So I’m going to send in the code like
   you asked me in your original reply to me.
 *  [Rahul Gandhi](https://wordpress.org/support/users/wpdev10/)
 * (@wpdev10)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/code-snippets-conflict/#post-14702153)
 * Hi,
 * We have got your ticket and we will reply there for your issue.
 * Regards,
    Patrik

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Code snippets conflict’ is closed to new replies.

 * ![](https://ps.w.org/userswp/assets/icon-256x256.png?rev=2784318)
 * [UsersWP - Front-end login form, User Registration, User Profile & Members Directory plugin for WP](https://wordpress.org/plugins/userswp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/userswp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/userswp/)
 * [Active Topics](https://wordpress.org/support/plugin/userswp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/userswp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/userswp/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [Rahul Gandhi](https://wordpress.org/support/users/wpdev10/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/code-snippets-conflict/#post-14702153)
 * Status: resolved