{"id":5816,"date":"2020-03-15T17:23:09","date_gmt":"2020-03-15T17:23:09","guid":{"rendered":"https:\/\/expertwebtechnologies.com\/?p=5816"},"modified":"2025-01-07T13:33:00","modified_gmt":"2025-01-07T13:33:00","slug":"customize-woocommerce-settings-tab","status":"publish","type":"post","link":"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/","title":{"rendered":"WooCommerce : Customize Woocommerce Settings Tab."},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">WooCommerce : Customize Woocommerce Settings Tab.<\/h1>\n\n\n\n<p>WooCommerce is the more powerful e-commerce plugin for WordPress.And what i love with WooCommerce is that there\u2019s an API for nearly everything.There are almost Hooks and filters For Every Customization work.<\/p>\n\n\n\n<p>Let&#8217;s talk about customizing Woocommerce Admin setting Tabs.To hide a specific Woocommerce setting tab or want to customize the Woocommerce setting tabs, not the entire sub-menu, but just a tab.For just Removing tabs we can use <code style=\"color: seagreen;\">'woocommerce_settings_tabs_array'<\/code> Woocommerce Filter.<\/p>\n\n\n\n<p>If you want to remove tabs instead of hiding them using CSS, then you can add the following to yours theme&#8217;s functions.php.<br>\n<code style=\"color: black; background: #d3d3d338;\"><br>\nfunction RemoveWoocommerceSettingTabs( $value) {<br>\n\/\/ the tabs we want to hide<br>\n$tabToHide = array(<br>\n'tax' =&gt; 'Tax',<br>\n'checkout' =&gt; 'Checkout',<br>\n'products' =&gt; 'products',<br>\n'shipping' =&gt; 'Shipping',<br>\n'integration' =&gt; 'Integration',<br>\n'advanced' =&gt; 'Advanced',<br>\n'email' =&gt; 'Emails',<br>\n'api' =&gt; 'API',<br>\n'account' =&gt; 'Accounts',<br>\n);<br>\n\/\/ Tabs We want to hide<br>\n$value= array_diff_key($value, $tabToHide);<br>\nreturn $value;<br>\n}<br>\nadd_filter('woocommerce_settings_tabs_array','RemoveWoocommerceSettingTabs');<br>\n<\/code><\/p>\n\n\n\n<p>In this code $value passed in Function is empty variable,because all WooCommerce tabs has priority equal to 20.<br>\nso we have to add higher priority than 20, so now filter is<br>\n<code style=\"color: black; background: #d3d3d338;\"><br>\nadd_filter('woocommerce_settings_tabs_array','RemoveWoocommerceSettingTabs', 200, 1);<br>\n<\/code><br>\nBut WE can still access the URLs of tabs .So This is just a way of removing the tabs Form html instead of hiding them. Means this filter just added benefit that tabs is not in HTML, so if we look at the source code, we would not find the elements.<br>\nSo we have to modify the hook more.<br>\n<code style=\"color: black; background: #d3d3d338;\"><br>\nfunction RemoveWoocommerceSettingTabs( $value) {<br>\n\/\/ the tabs we want to hide<br>\n$tabToHide= array(<br>\n'tax' =&gt; 'Tax',<br>\n'checkout' =&gt; 'Checkout',<br>\n'products' =&gt; 'products',<br>\n'shipping' =&gt; 'Shipping',<br>\n'integration' =&gt; 'Integration',<br>\n'advanced' =&gt; 'Advanced',<br>\n'email' =&gt; 'Emails',<br>\n'api' =&gt; 'API',<br>\n'account' =&gt; 'Accounts',<br>\n);<br>\n\/\/ Tabs We want to hide<br>\n$value= array_diff_key($value, $tabToHide);<br>\nforeach($tabToHide as $tabs =&gt; $title) {<br>\nadd_action( 'woocommerce_settings_' . $array, 'RedirectFromTabPage');<br>\n}<br>\nreturn $value;<br>\n}<br>\nadd_filter('woocommerce_settings_tabs_array','RemoveWoocommerceSettingTabs', 200, 1);<\/code><\/p>\n\n\n\n<p>function RedirectFromTabPage() {<br>\nwp_redirect(get_admin_url().&#8217;\/admin.php?page=wc-settings&#8217;);<br>\nexit;<br>\n}<\/p>\n\n\n\n<p>I have added a foreach loop that goes through list of tabs we want to block and hooks it into the &#8216;woocommerce_settings_{$tab}&#8217; action which is used to show settings pages of WooCommerce. Function <code style=\"color: seagreen;\">'RedirectFromTabPagefunction'<\/code> is used for redirecting to custom URL.<\/p>\n\n\n\n<p>Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WooCommerce : Customize Woocommerce Settings Tab. WooCommerce is the more powerful e-commerce plugin for WordPress.And what i love with WooCommerce is that there\u2019s an API for nearly everything.There are almost Hooks and filters For Every Customization work. Let&#8217;s talk about customizing Woocommerce Admin setting Tabs.To hide a specific Woocommerce setting tab or want to customize [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8674,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,35,36],"tags":[],"class_list":["post-5816","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-woocommerce","category-woocommerce-hooks","category-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WooCommerce : Customize Woocommerce Settings Tab. - EoXys IT<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WooCommerce : Customize Woocommerce Settings Tab. - EoXys IT\" \/>\n<meta property=\"og:description\" content=\"WooCommerce : Customize Woocommerce Settings Tab. WooCommerce is the more powerful e-commerce plugin for WordPress.And what i love with WooCommerce is that there\u2019s an API for nearly everything.There are almost Hooks and filters For Every Customization work. Let&#8217;s talk about customizing Woocommerce Admin setting Tabs.To hide a specific Woocommerce setting tab or want to customize [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/\" \/>\n<meta property=\"og:site_name\" content=\"EoXys IT\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-15T17:23:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-07T13:33:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eoxysit.com\/blogs\/wp-content\/uploads\/2021\/06\/woocommerce-products-custom-fields.png\" \/>\n\t<meta property=\"og:image:width\" content=\"768\" \/>\n\t<meta property=\"og:image:height\" content=\"430\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Shiv kumawat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Shiv kumawat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/\"},\"author\":{\"name\":\"Shiv kumawat\",\"@id\":\"https:\/\/eoxysit.com\/blogs\/#\/schema\/person\/b8b420c1462d95348959794eec60fb59\"},\"headline\":\"WooCommerce : Customize Woocommerce Settings Tab.\",\"datePublished\":\"2020-03-15T17:23:09+00:00\",\"dateModified\":\"2025-01-07T13:33:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/\"},\"wordCount\":253,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eoxysit.com\/blogs\/wp-content\/uploads\/2021\/06\/woocommerce-products-custom-fields.png\",\"articleSection\":[\"Woocommerce\",\"Woocommerce Hooks\",\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/\",\"url\":\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/\",\"name\":\"WooCommerce : Customize Woocommerce Settings Tab. - EoXys IT\",\"isPartOf\":{\"@id\":\"https:\/\/eoxysit.com\/blogs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eoxysit.com\/blogs\/wp-content\/uploads\/2021\/06\/woocommerce-products-custom-fields.png\",\"datePublished\":\"2020-03-15T17:23:09+00:00\",\"dateModified\":\"2025-01-07T13:33:00+00:00\",\"author\":{\"@id\":\"https:\/\/eoxysit.com\/blogs\/#\/schema\/person\/b8b420c1462d95348959794eec60fb59\"},\"breadcrumb\":{\"@id\":\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#primaryimage\",\"url\":\"https:\/\/eoxysit.com\/blogs\/wp-content\/uploads\/2021\/06\/woocommerce-products-custom-fields.png\",\"contentUrl\":\"https:\/\/eoxysit.com\/blogs\/wp-content\/uploads\/2021\/06\/woocommerce-products-custom-fields.png\",\"width\":768,\"height\":430,\"caption\":\"Code\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eoxysit.com\/blogs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WooCommerce : Customize Woocommerce Settings Tab.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eoxysit.com\/blogs\/#website\",\"url\":\"https:\/\/eoxysit.com\/blogs\/\",\"name\":\"EoXys IT\",\"description\":\"Digitise your business\",\"alternateName\":\"Eoxys It\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eoxysit.com\/blogs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/eoxysit.com\/blogs\/#\/schema\/person\/b8b420c1462d95348959794eec60fb59\",\"name\":\"Shiv kumawat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eoxysit.com\/blogs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/eoxysit.com\/blogs\/wp-content\/uploads\/2025\/03\/CEO-150x150.png\",\"contentUrl\":\"https:\/\/eoxysit.com\/blogs\/wp-content\/uploads\/2025\/03\/CEO-150x150.png\",\"caption\":\"Shiv kumawat\"},\"description\":\"\\\"Shiv kumawat is the Executive Director and CEO of Eoxys It Solution LLP and the strategic mind behind the company\\\"s growth. His expertise in operational efficiency and team leadership empowers his colleagues to excel and innovate.\u201d\",\"sameAs\":[\"https:\/\/eoxysit.com\/\"],\"url\":\"https:\/\/eoxysit.com\/blogs\/author\/shivkumawat1985\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WooCommerce : Customize Woocommerce Settings Tab. - EoXys IT","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/","og_locale":"en_US","og_type":"article","og_title":"WooCommerce : Customize Woocommerce Settings Tab. - EoXys IT","og_description":"WooCommerce : Customize Woocommerce Settings Tab. WooCommerce is the more powerful e-commerce plugin for WordPress.And what i love with WooCommerce is that there\u2019s an API for nearly everything.There are almost Hooks and filters For Every Customization work. Let&#8217;s talk about customizing Woocommerce Admin setting Tabs.To hide a specific Woocommerce setting tab or want to customize [&hellip;]","og_url":"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/","og_site_name":"EoXys IT","article_published_time":"2020-03-15T17:23:09+00:00","article_modified_time":"2025-01-07T13:33:00+00:00","og_image":[{"width":768,"height":430,"url":"https:\/\/eoxysit.com\/blogs\/wp-content\/uploads\/2021\/06\/woocommerce-products-custom-fields.png","type":"image\/png"}],"author":"Shiv kumawat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Shiv kumawat","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#article","isPartOf":{"@id":"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/"},"author":{"name":"Shiv kumawat","@id":"https:\/\/eoxysit.com\/blogs\/#\/schema\/person\/b8b420c1462d95348959794eec60fb59"},"headline":"WooCommerce : Customize Woocommerce Settings Tab.","datePublished":"2020-03-15T17:23:09+00:00","dateModified":"2025-01-07T13:33:00+00:00","mainEntityOfPage":{"@id":"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/"},"wordCount":253,"commentCount":0,"image":{"@id":"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#primaryimage"},"thumbnailUrl":"https:\/\/eoxysit.com\/blogs\/wp-content\/uploads\/2021\/06\/woocommerce-products-custom-fields.png","articleSection":["Woocommerce","Woocommerce Hooks","WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/","url":"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/","name":"WooCommerce : Customize Woocommerce Settings Tab. - EoXys IT","isPartOf":{"@id":"https:\/\/eoxysit.com\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#primaryimage"},"image":{"@id":"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#primaryimage"},"thumbnailUrl":"https:\/\/eoxysit.com\/blogs\/wp-content\/uploads\/2021\/06\/woocommerce-products-custom-fields.png","datePublished":"2020-03-15T17:23:09+00:00","dateModified":"2025-01-07T13:33:00+00:00","author":{"@id":"https:\/\/eoxysit.com\/blogs\/#\/schema\/person\/b8b420c1462d95348959794eec60fb59"},"breadcrumb":{"@id":"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#primaryimage","url":"https:\/\/eoxysit.com\/blogs\/wp-content\/uploads\/2021\/06\/woocommerce-products-custom-fields.png","contentUrl":"https:\/\/eoxysit.com\/blogs\/wp-content\/uploads\/2021\/06\/woocommerce-products-custom-fields.png","width":768,"height":430,"caption":"Code"},{"@type":"BreadcrumbList","@id":"https:\/\/eoxysit.com\/blogs\/customize-woocommerce-settings-tab\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eoxysit.com\/blogs\/"},{"@type":"ListItem","position":2,"name":"WooCommerce : Customize Woocommerce Settings Tab."}]},{"@type":"WebSite","@id":"https:\/\/eoxysit.com\/blogs\/#website","url":"https:\/\/eoxysit.com\/blogs\/","name":"EoXys IT","description":"Digitise your business","alternateName":"Eoxys It","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eoxysit.com\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/eoxysit.com\/blogs\/#\/schema\/person\/b8b420c1462d95348959794eec60fb59","name":"Shiv kumawat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eoxysit.com\/blogs\/#\/schema\/person\/image\/","url":"https:\/\/eoxysit.com\/blogs\/wp-content\/uploads\/2025\/03\/CEO-150x150.png","contentUrl":"https:\/\/eoxysit.com\/blogs\/wp-content\/uploads\/2025\/03\/CEO-150x150.png","caption":"Shiv kumawat"},"description":"\"Shiv kumawat is the Executive Director and CEO of Eoxys It Solution LLP and the strategic mind behind the company\"s growth. His expertise in operational efficiency and team leadership empowers his colleagues to excel and innovate.\u201d","sameAs":["https:\/\/eoxysit.com\/"],"url":"https:\/\/eoxysit.com\/blogs\/author\/shivkumawat1985\/"}]}},"_links":{"self":[{"href":"https:\/\/eoxysit.com\/blogs\/wp-json\/wp\/v2\/posts\/5816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eoxysit.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eoxysit.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eoxysit.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eoxysit.com\/blogs\/wp-json\/wp\/v2\/comments?post=5816"}],"version-history":[{"count":0,"href":"https:\/\/eoxysit.com\/blogs\/wp-json\/wp\/v2\/posts\/5816\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eoxysit.com\/blogs\/wp-json\/wp\/v2\/media\/8674"}],"wp:attachment":[{"href":"https:\/\/eoxysit.com\/blogs\/wp-json\/wp\/v2\/media?parent=5816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eoxysit.com\/blogs\/wp-json\/wp\/v2\/categories?post=5816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eoxysit.com\/blogs\/wp-json\/wp\/v2\/tags?post=5816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}