{"id":7013,"date":"2025-05-28T12:25:57","date_gmt":"2025-05-28T19:25:57","guid":{"rendered":"https:\/\/www.numinix.com\/blog\/?p=7013"},"modified":"2025-05-28T12:25:59","modified_gmt":"2025-05-28T19:25:59","slug":"how-to-change-woocommerce-magnifying-glass","status":"publish","type":"post","link":"https:\/\/www.numinix.com\/blog\/how-to-change-woocommerce-magnifying-glass\/","title":{"rendered":"How To Change WooCommerce Magnifying Glass?"},"content":{"rendered":"\n<p>A subtle icon swap can freshen your store\u2019s look and reinforce your branding. Below are four reliable approaches\u2014ranging from a quick CSS snippet to a full template override\u2014so you can choose the level of control that suits your workflow. Each technique assumes you already know your way around the WordPress Customizer, child themes, and basic file management.<\/p>\n\n\n\n<p>If you are not familiar with these and want help, Numinix&#8217;s <a href=\"https:\/\/www.numinix.com\/woocommerce_development_services\">WooCommerce development team<\/a> can take of that for you.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"#\" data-href=\"https:\/\/www.numinix.com\/blog\/how-to-change-woocommerce-magnifying-glass\/#Disclaimer\" >Disclaimer<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"#\" data-href=\"https:\/\/www.numinix.com\/blog\/how-to-change-woocommerce-magnifying-glass\/#Why_Change_the_WooCommerce_Magnifying-Glass_Icon\" >Why Change the WooCommerce Magnifying-Glass Icon?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"#\" data-href=\"https:\/\/www.numinix.com\/blog\/how-to-change-woocommerce-magnifying-glass\/#1_Get_Ready_Backups_Child_Theme_and_Icon_Assets\" >1. Get Ready: Backups, Child Theme, and Icon Assets<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"#\" data-href=\"https:\/\/www.numinix.com\/blog\/how-to-change-woocommerce-magnifying-glass\/#2_Fast_Fix_Replace_the_Icon_with_Pure_CSS\" >2. Fast Fix: Replace the Icon with Pure CSS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"#\" data-href=\"https:\/\/www.numinix.com\/blog\/how-to-change-woocommerce-magnifying-glass\/#3_Swap_the_Graphic_File_Template_Override_Method\" >3. Swap the Graphic File (Template Override Method)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"#\" data-href=\"https:\/\/www.numinix.com\/blog\/how-to-change-woocommerce-magnifying-glass\/#4_Control_Everything_with_a_Dedicated_Plugin\" >4. Control Everything with a Dedicated Plugin<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"#\" data-href=\"https:\/\/www.numinix.com\/blog\/how-to-change-woocommerce-magnifying-glass\/#5_Changing_the_Search-Bar_Magnifier\" >5. Changing the Search-Bar Magnifier<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"#\" data-href=\"https:\/\/www.numinix.com\/blog\/how-to-change-woocommerce-magnifying-glass\/#6_Test_Troubleshoot\" >6. Test &amp; Troubleshoot<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"#\" data-href=\"https:\/\/www.numinix.com\/blog\/how-to-change-woocommerce-magnifying-glass\/#7_Finishing_Touches\" >7. Finishing Touches<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Disclaimer\"><\/span>Disclaimer<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The guidance is offered for informational purposes only. Implementing any code, template edits, or plugin changes is done at your own discretion. Always back up your site and test on a staging environment before modifying a live store. Numinix is not responsible for any data loss, downtime, or other issues that may arise from following these instructions, and no warranties\u2014express or implied\u2014are provided. If you are uncertain about any step, consult a qualified developer.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Change_the_WooCommerce_Magnifying-Glass_Icon\"><\/span>Why Change the WooCommerce Magnifying-Glass Icon?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Stock icons rarely capture a store\u2019s unique personality. Swapping WooCommerce\u2019s default magnifying-glass icon reinforces branding, improves usability, and can even trim load times. By introducing a custom SVG or icon-font glyph, the zoom trigger and search button instantly align with your color palette, stroke weight, and overall design language, creating a cohesive, professional impression that fosters trust. Usability rises because a clearer or larger symbol guides shoppers who might otherwise miss the zoom feature or search bar, reducing friction and keeping them engaged longer. A high-contrast or animated icon also helps meet accessibility guidelines, giving keyboard and screen-reader users clear cues and lowering legal risk. Performance may benefit, too: an inline SVG eliminates the extra HTTP request required by bulky icon sets. At a glance, this subtle tweak signals meticulous care\u2014suggesting your store is well maintained, frequently updated, and worth revisiting\u2014achieved with a simple, five-minute adjustment on your storefront.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Get_Ready_Backups_Child_Theme_and_Icon_Assets\"><\/span>1. Get Ready: Backups, Child Theme, and Icon Assets<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Back up your site.<\/strong> A staging copy or a snapshot from your host lets you roll back if something breaks.<\/li>\n\n\n\n<li><strong>Activate a child theme<\/strong> (or create one). Direct edits in a parent theme disappear with updates.<\/li>\n\n\n\n<li><strong>Collect your replacement icon<\/strong>:\n<ul class=\"wp-block-list\">\n<li><strong>SVG<\/strong> (preferred for sharp scaling).<\/li>\n\n\n\n<li><strong>PNG<\/strong> at 2\u00d7 the largest size it will appear.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Note the two places where WooCommerce shows magnifiers:\n<ul class=\"wp-block-list\">\n<li><strong>Product-image zoom trigger<\/strong> (.woocommerce-product-gallery__trigger).<\/li>\n\n\n\n<li><strong>Search bar submit button<\/strong> (theme-dependent markup or a plugin such as FiboSearch).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Fast_Fix_Replace_the_Icon_with_Pure_CSS\"><\/span>2. Fast Fix: Replace the Icon with Pure CSS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Perfect when your theme already loads an icon font (Font Awesome, LineIcons, etc.).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* Add in Customizer \u25b8 Additional CSS *\/\n.woocommerce-product-gallery__trigger::before {\n    content: \"\\f002\";          \/* Font Awesome search icon glyph *\/\n    font-family: \"Font Awesome 6 Free\";\n    font-weight: 900;          \/* solid style *\/\n    font-size: 20px;\n    color: #444;               \/* match your palette *\/\n}\n.woocommerce-product-gallery__trigger img {\n    display: none;             \/* hide the original SVG\/PNG *\/\n}\n<\/code><\/pre>\n\n\n\n<p><strong>Why it works<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CSS content inserts a font character.<\/li>\n\n\n\n<li>No PHP edits, so it survives WooCommerce updates.<\/li>\n\n\n\n<li>You can adjust size, color, and hover state in a few lines<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Swap_the_Graphic_File_Template_Override_Method\"><\/span>3. Swap the Graphic File (Template Override Method)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you prefer a custom SVG or need total markup control:<\/p>\n\n\n\n<p>1. Copy the template<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp-content\/plugins\/woocommerce\/templates\/single-product\/product-image.php\n<\/code><\/pre>\n\n\n\n<p>to <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp-content\/themes\/your-child-theme\/woocommerce\/single-product\/product-image.php<\/code><\/pre>\n\n\n\n<p>2. Open the copied file and locate<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;button class=\"woocommerce-product-gallery__trigger\" ... &gt;\n    &lt;?php echo wc_get_svg_icon( 'zoom' ); ?&gt;  &lt;!-- original icon --&gt;\n&lt;\/button&gt;<\/code><\/pre>\n\n\n\n<p>3. Replace the call with your SVG, e.g.: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;svg aria-hidden=\"true\" width=\"20\" height=\"20\" class=\"custom-zoom\"&gt;\n    &lt;use href=\"#icon-search\"&gt;&lt;\/use&gt;\n&lt;\/svg&gt;\n<\/code><\/pre>\n\n\n\n<p>4. Flush caches and confirm the new graphic appears at every breakpoint.<\/p>\n\n\n\n<p>Tip: Keep any ARIA labels intact to preserve accessibility.<\/p>\n\n\n\n<p>This technique persists through plugin updates because WooCommerce will load the overridden template from your child theme first.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Control_Everything_with_a_Dedicated_Plugin\"><\/span>4. Control Everything with a Dedicated Plugin<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you want point-and-click settings\u2014size sliders, color pickers, and optional lens effects\u2014install <strong>Product Image Zoom for WooCommerce<\/strong> and:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Plugins \u25b8 Add New \u25b8 Upload<\/strong> the ZIP.<\/li>\n\n\n\n<li><strong>WooCommerce \u25b8 Settings \u25b8 Product Image Zoom \u25b8 General<\/strong>.<\/li>\n\n\n\n<li>Adjust <em>Icon Color<\/em>, <em>Icon Size<\/em>, and <em>Icon Shape<\/em> fields to match your design.<\/li>\n\n\n\n<li>Save changes and clear site + browser cache<\/li>\n<\/ol>\n\n\n\n<p>Plugins vary, but most bundle several zoom styles (fade-in, inner zoom, lens) and handle retina icons automatically.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Changing_the_Search-Bar_Magnifier\"><\/span>5. Changing the Search-Bar Magnifier<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Many stores also want the same branding in the header search.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Theme markup:<\/strong> Search for get_search_form() or header partials inside your child theme, then swap the &lt;input type=&#8221;submit&#8221;&gt; text for an SVG or Font Awesome glyph exactly as in Section&nbsp;2.<\/li>\n\n\n\n<li><strong>FiboSearch (AJAX Search) plugin:<\/strong> Add the snippet below to <strong>Appearance \u25b8 Customizer \u25b8 Additional CSS<\/strong> to overwrite its default icon:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>.dgwt-wcas-search-submit::before {\n    content: \"\\e900\";               \/* your icon font glyph *\/\n    font-family: \"IconFont\";\n    font-size: 18px;\n}\n.dgwt-wcas-search-submit svg,\n.dgwt-wcas-search-submit img {\n    display: none;\n}\n``` :contentReference&#91;oaicite:4]{index=4}\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_Test_Troubleshoot\"><\/span>6. Test &amp; Troubleshoot<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Symptom<\/th><th>Fix<\/th><\/tr><\/thead><tbody><tr><td>Icon does not appear<\/td><td>Confirm font family loads; inspect in DevTools for 404 errors.<\/td><\/tr><tr><td>Wrong icon on mobile<\/td><td>Ensure mobile header uses the same selector; some themes switch IDs.<\/td><\/tr><tr><td>Icon shows twice<\/td><td>Hide originals (<code>display:none<\/code>) <em>after<\/em> the theme stylesheet loads.<\/td><\/tr><tr><td>Caching or CDN still serves old<\/td><td>Purge cache, then hard-refresh (Ctrl + Shift + R).<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"7_Finishing_Touches\"><\/span>7. Finishing Touches<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Hover states<\/strong>: add <code>:hover<\/code> rules for color changes or subtle transforms (<code>transform: scale(1.1)<\/code>).<\/li>\n\n\n\n<li><strong>Accessibility<\/strong>: keep <code>&lt;span class=\"screen-reader-text\"&gt;Zoom product image&lt;\/span&gt;<\/code> or <code>aria-label<\/code> attributes.<\/li>\n\n\n\n<li><strong>Performance<\/strong>: inline small SVGs (&lt;4 KB) to avoid extra network requests.<\/li>\n\n\n\n<li><strong>Consistency<\/strong>: update every location where the magnifier shows (quick-view modals, mobile search overlay, sticky headers).<\/li>\n<\/ul>\n\n\n\n<p>Replacing WooCommerce\u2019s default magnifying-glass icon is straightforward once you decide whether you want a CSS, template, or plugin-based approach. A lightweight CSS swap is fastest, a template override offers pixel-perfect control, and a plugin delivers a GUI with bonus zoom features. Whichever route you take, keep changes inside a child theme, maintain accessible markup, and clear your caches for immediate results. Your refreshed icon will blend seamlessly into your store\u2019s aesthetic while keeping shoppers focused on what matters\u2014your products.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A subtle icon swap can freshen your store\u2019s look and reinforce your branding. Below are four reliable approaches\u2014ranging from a quick CSS snippet to a full template override\u2014so you can choose the level of control that suits your workflow. Each technique assumes you already know your way around the WordPress Customizer, child themes, and basic&#8230;<\/p>\n","protected":false},"author":271,"featured_media":7019,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[586],"tags":[],"class_list":["post-7013","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-development"],"modified_by":"Nurul Afsar","jetpack_featured_media_url":"https:\/\/www.numinix.com\/wordpress\/wp-content\/uploads\/2025\/05\/WooCommerce.jpg","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.numinix.com\/blog\/wp-json\/wp\/v2\/posts\/7013","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.numinix.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.numinix.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.numinix.com\/blog\/wp-json\/wp\/v2\/users\/271"}],"replies":[{"embeddable":true,"href":"https:\/\/www.numinix.com\/blog\/wp-json\/wp\/v2\/comments?post=7013"}],"version-history":[{"count":0,"href":"https:\/\/www.numinix.com\/blog\/wp-json\/wp\/v2\/posts\/7013\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.numinix.com\/blog\/wp-json\/wp\/v2\/media\/7019"}],"wp:attachment":[{"href":"https:\/\/www.numinix.com\/blog\/wp-json\/wp\/v2\/media?parent=7013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.numinix.com\/blog\/wp-json\/wp\/v2\/categories?post=7013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.numinix.com\/blog\/wp-json\/wp\/v2\/tags?post=7013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}