{"id":138029,"date":"2023-06-23T06:32:44","date_gmt":"2023-06-23T06:32:44","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=138029"},"modified":"2024-04-17T13:07:29","modified_gmt":"2024-04-17T13:07:29","slug":"how-to-add-custom-product-label-in-woocommerce","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/","title":{"rendered":"How to Add Custom Product Label in WooCommerce?"},"content":{"rendered":"\n<p>In this post, we&#8217;ll see how we can add custom product label in WooCommerce on the shop page and single page.<\/p>\n\n\n\n<p>If you require expert assistance or want to develop custom unique functionality,<a href=\"https:\/\/webkul.com\/hire-woocommerce-developers\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u00a0hire WooCommerce Developers<\/a>\u00a0for your project.<\/p>\n\n\n\n<p>We can add labels to either all products or based on any condition like the product is simple to highlight from others like WooCommerce does when the product is in the sale.<\/p>\n\n\n\n<p>Let&#8217;s start with creating a test plugin to achieve the said feature.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\n\/**\n *  Plugin Name: WooCommerce Custom Product Label webkul\n *  Description: To add custom label on shop page and single product page.\n *  Author: Webkul\n *  Author URI: https:\/\/webkul.com\n *  Plugin URI: https:\/\/webkul.com\n *\/<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"892\" height=\"92\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26.png\" alt=\"image-18-26\" class=\"wp-image-388076\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26.png 892w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26-300x31.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26-250x26.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26-768x79.png 768w\" sizes=\"(max-width: 892px) 100vw, 892px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Activate the plugin from the admin dashboard under Plugins-&gt;Installed Plugins.<\/p>\n\n\n\n<p>First, we&#8217;ll add labels to simple products on the shop page and then we&#8217;ll move to the product single page. For the shop page, we&#8217;ll use the hook &#8216;woocommerce_before_shop_loop_item_title&#8217; provided by WooCommerce.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">add_action( &#039;plugins_loaded&#039;, &#039;wk_product_label_loaded&#039; );\n\nfunction wk_product_label_loaded() {\n  new WK_Product_Label();\n}\n\nif ( ! class_exists( &#039;WK_Product_Label&#039; ) ) {\n  \/**\n   *\n   *\/\n  class WK_Product_Label {\n\n    function __construct() {\n      add_action( &#039;woocommerce_before_shop_loop_item_title&#039;, array( $this, &#039;wk_shop_product_label&#039; ) );\n    }\n\n    function wk_shop_product_label() {\n      global $product;\n\n      if ( &#039;simple&#039; === $product-&gt;get_type() ) {\n        echo &#039;&lt;span class=&quot;wk-shop-label&quot;&gt;&lt;img src=&quot;https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/wc-custom-label-2.jpg&quot; \/&gt;&lt;\/span&gt;&#039;;\n      }\n    }\n  }\n\n}<\/pre>\n\n\n\n<p>In the above code snippet, we initialize the <a href=\"https:\/\/store.webkul.com\/woocommerce-custom-product-labels.html\" target=\"_blank\" rel=\"noreferrer noopener\">WooCommerce Product Label<\/a> plugin&#8217;s main class on the &#8216;plugins_loaded&#8217; hook. And then we added an action to the hook we mentioned earlier to add a label on the shop page.<\/p>\n\n\n\n<p>In the callback function, we have applied a conditional check that if the product is of simple type then only the label should apply. So, this code will add the image before the product title as the hook says.<\/p>\n\n\n\n<p>Now, with the help of CSS, we&#8217;ll place this image on the product corner so that it looks like a label. CSS can be added to this by enqueuing an external file. But here as the task is not so big, so we&#8217;ll write CSS on the same file by using the &#8216;wp_head&#8217; hook.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">function __construct() {\n   add_action( &#039;wp_head&#039;, array( $this, &#039;wk_label_style&#039; ) );\n}\n\nfunction wk_label_style() {\n  ?&gt;\n  &lt;style&gt;\n  .wk-shop-label img{\n     max-width: 60px;\n     max-height: 60px;\n     position: absolute;\n     top: 0;\n     left: 0;\n  }\n  &lt;\/style&gt;\n  &lt;?php\n}<\/pre>\n\n\n\n<p>The above CSS code will place the label in the top left corner of the product. Please check below &#8211;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"866\" height=\"567\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/wc-custom-label-3.jpg\" alt=\"WooCommerce Custom Product Label\" class=\"wp-image-138053\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/wc-custom-label-3.jpg 866w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/wc-custom-label-3-250x164.jpg 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/wc-custom-label-3-300x196.jpg 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/wc-custom-label-3-768x503.jpg 768w\" sizes=\"(max-width: 866px) 100vw, 866px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Now, this is all for adding custom labels for products on the shop page. Let&#8217;s start to add the same label on a product single page if the product is simple.<\/p>\n\n\n\n<p>Here, we&#8217;ll use hook &#8216;woocommerce_single_product_image_thumbnail_html&#8217; which is a filter hook so we need to add a filter on the same. This filter provides $output as an argument so as the filter works we can add a custom label with default output.<\/p>\n\n\n\n<p>Let&#8217;s check the code &#8211;<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">function __construct() {\n   add_filter( &#039;woocommerce_single_product_image_thumbnail_html&#039;, array( $this, &#039;wk_single_product_label&#039; ) );\n}\n\nfunction wk_single_product_label( $output ) {\n    global $product;\n    if ( &#039;simple&#039; === $product-&gt;get_type() ) {\n       $output .= &#039;&lt;span class=&quot;wk-shop-label&quot;&gt;&lt;img src=&quot;https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/wc-custom-label-2.jpg&quot;&gt;&lt;\/span&gt;&#039;;\n    }\n    return $output;\n}<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/wc-custom-label-4.jpg\"><img decoding=\"async\" width=\"907\" height=\"610\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/wc-custom-label-4.jpg\" alt=\"WooCommerce Custom Product Label\" class=\"wp-image-138056\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/wc-custom-label-4.jpg 907w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/wc-custom-label-4-250x168.jpg 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/wc-custom-label-4-300x202.jpg 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2018\/08\/wc-custom-label-4-768x517.jpg 768w\" sizes=\"(max-width: 907px) 100vw, 907px\" loading=\"lazy\" \/><\/a><\/figure>\n\n\n\n<p>That&#8217;s all about &#8220;How to Add Custom Product Label in WooCommerce&#8221;. Thanks for your time \ud83d\ude42<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Support<\/h2>\n\n\n\n<p>For any technical assistance kindly <a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\" target=\"_blank\" rel=\"noreferrer noopener\"> raise\u00a0a ticket<\/a>\u00a0or\u00a0reach\u00a0us by email at\u00a0support@webkul.com. Thanks for Your Time! Have a Good Day!<\/p>\n\n\n\n<p>Also, discover various solutions to add more features and enhance your online store by visiting the\u00a0<a href=\"https:\/\/store.webkul.com\/woocommerce-plugins.html\" target=\"_blank\" rel=\"noreferrer noopener\">WooCommerce plugins<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, we&#8217;ll see how we can add custom product label in WooCommerce on the shop page and single page. If you require expert assistance or want to develop custom unique functionality,\u00a0hire WooCommerce Developers\u00a0for your project. We can add labels to either all products or based on any condition like the product is simple <a href=\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":505,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1773,1260],"tags":[794,1468],"class_list":["post-138029","post","type-post","status-publish","format-standard","hentry","category-woocommerce","category-wordpress","tag-custom-label","tag-woocommerce"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WooCommerce Custom Product Label Shop Page<\/title>\n<meta name=\"description\" content=\"How to add custom labels to product on shop listing page and product single page in WooCommerce with the help of hooks.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WooCommerce Custom Product Label Shop Page\" \/>\n<meta property=\"og:description\" content=\"How to add custom labels to product on shop listing page and product single page in WooCommerce with the help of hooks.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-23T06:32:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-17T13:07:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26.png\" \/>\n<meta name=\"author\" content=\"Raushan Kumar Paswan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Raushan Kumar Paswan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/\"},\"author\":{\"name\":\"Raushan Kumar Paswan\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/db36277344bb56e4917bf0211aec8793\"},\"headline\":\"How to Add Custom Product Label in WooCommerce?\",\"datePublished\":\"2023-06-23T06:32:44+00:00\",\"dateModified\":\"2024-04-17T13:07:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/\"},\"wordCount\":435,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26.png\",\"keywords\":[\"Custom Label\",\"WooCommerce\"],\"articleSection\":[\"WooCommerce\",\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/\",\"name\":\"WooCommerce Custom Product Label Shop Page\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26.png\",\"datePublished\":\"2023-06-23T06:32:44+00:00\",\"dateModified\":\"2024-04-17T13:07:29+00:00\",\"description\":\"How to add custom labels to product on shop listing page and product single page in WooCommerce with the help of hooks.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26.png\",\"width\":892,\"height\":92,\"caption\":\"image-18-26\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Add Custom Product Label in WooCommerce?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/db36277344bb56e4917bf0211aec8793\",\"name\":\"Raushan Kumar Paswan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ce9851ee21ba1ce546af25d566be4dffeaa3d4f8a1be72688619265ad326a321?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ce9851ee21ba1ce546af25d566be4dffeaa3d4f8a1be72688619265ad326a321?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Raushan Kumar Paswan\"},\"description\":\"Raushan specializes in WordPress SaaS Development and Shipping Method services, delivering scalable solutions that streamline eCommerce operations. Expertise drives enhanced digital presence and empowers businesses to achieve sustained growth.\",\"url\":\"https:\/\/webkul.com\/blog\/author\/raushankrpaswan-wp333\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WooCommerce Custom Product Label Shop Page","description":"How to add custom labels to product on shop listing page and product single page in WooCommerce with the help of hooks.","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:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/","og_locale":"en_US","og_type":"article","og_title":"WooCommerce Custom Product Label Shop Page","og_description":"How to add custom labels to product on shop listing page and product single page in WooCommerce with the help of hooks.","og_url":"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-06-23T06:32:44+00:00","article_modified_time":"2024-04-17T13:07:29+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26.png","type":"","width":"","height":""}],"author":"Raushan Kumar Paswan","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Raushan Kumar Paswan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/"},"author":{"name":"Raushan Kumar Paswan","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/db36277344bb56e4917bf0211aec8793"},"headline":"How to Add Custom Product Label in WooCommerce?","datePublished":"2023-06-23T06:32:44+00:00","dateModified":"2024-04-17T13:07:29+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/"},"wordCount":435,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26.png","keywords":["Custom Label","WooCommerce"],"articleSection":["WooCommerce","WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/","url":"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/","name":"WooCommerce Custom Product Label Shop Page","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26.png","datePublished":"2023-06-23T06:32:44+00:00","dateModified":"2024-04-17T13:07:29+00:00","description":"How to add custom labels to product on shop listing page and product single page in WooCommerce with the help of hooks.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/image-18-26.png","width":892,"height":92,"caption":"image-18-26"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-product-label-in-woocommerce\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Add Custom Product Label in WooCommerce?"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/db36277344bb56e4917bf0211aec8793","name":"Raushan Kumar Paswan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ce9851ee21ba1ce546af25d566be4dffeaa3d4f8a1be72688619265ad326a321?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ce9851ee21ba1ce546af25d566be4dffeaa3d4f8a1be72688619265ad326a321?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Raushan Kumar Paswan"},"description":"Raushan specializes in WordPress SaaS Development and Shipping Method services, delivering scalable solutions that streamline eCommerce operations. Expertise drives enhanced digital presence and empowers businesses to achieve sustained growth.","url":"https:\/\/webkul.com\/blog\/author\/raushankrpaswan-wp333\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/138029","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/505"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=138029"}],"version-history":[{"count":23,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/138029\/revisions"}],"predecessor-version":[{"id":434681,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/138029\/revisions\/434681"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=138029"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=138029"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=138029"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}