{"id":389440,"date":"2023-07-07T13:28:34","date_gmt":"2023-07-07T13:28:34","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=389440"},"modified":"2026-01-22T13:07:38","modified_gmt":"2026-01-22T13:07:38","slug":"how-to-add-custom-cart-item-data-in-woocommerce","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/","title":{"rendered":"How to Add Custom Cart Item Data in WooCommerce?"},"content":{"rendered":"\n<p>WooCommerce allows you to add your own custom cart item data by utilizing the hooks.<\/p>\n\n\n\n<p>Here&#8217;s a step-by-step guide on how to display custom cart item data in WooCommerce:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add the code below to your Child theme&#8217;s functions.php file<\/h2>\n\n\n\n<p>It&#8217;s recommended to create and use a child to ensure your modifications are not lost during theme updates.<\/p>\n\n\n\n<p>Using the WooCommerce filter hook &#8216;<strong>woocommerce_get_item_data<\/strong>&#8216; for this purpose.<\/p>\n\n\n\n<p>We are going to add a custom field &#8216;<strong>Sold By<\/strong>&#8216; that displays the product author&#8217;s nice name on the cart and checkout pages.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\/**\n * Add &quot;Sold By&quot; info to cart item data.\n *\n * @param array $item_data Existing cart item data.\n * @param array $cart_item Cart item data.\n *\n * @return array Modified cart item data.\n *\/\nfunction wk_add_sold_by_to_cart_items( $item_data, $cart_item ) {\n\t$prod_id = isset( $cart_item&#091;&#039;product_id&#039;] ) ? $cart_item&#091;&#039;product_id&#039;] : 0;\n\tif ( $prod_id &gt; 0 ) {\n\t\t$author_id = get_post_field( &#039;post_author&#039;, $prod_id );\n\t\t$display_name = get_the_author_meta( &#039;nicename&#039;, $author_id );\n\n\t\t$item_data&#091;] = array(\n\t\t\t&#039;key&#039;   =&gt; __( &#039;Sold By&#039;, &#039;wk-child-theme&#039; ),\n\t\t\t&#039;value&#039; =&gt; $display_name,\n\t\t);\n\t}\n\n\treturn $item_data;\n}\nadd_filter( &#039;woocommerce_get_item_data&#039;, &#039;wk_add_sold_by_to_cart_items&#039;, 10, 2 );<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1514\" height=\"708\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item.webp\" alt=\"Custom cart data on the cart page.\" class=\"wp-image-523240\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item.webp 1514w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item-300x140.webp 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item-1200x561.webp 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item-250x117.webp 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item-768x359.webp 768w\" sizes=\"(max-width: 1514px) 100vw, 1514px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Showing the custom cart item data on the checkout page.<\/h2>\n\n\n\n<p>Note: This code will work for both <strong>classic<\/strong> and <strong>block<\/strong> (Introduced in WooCommerce <strong>version 8<\/strong>) cart as well as on checkout pages. <\/p>\n\n\n\n<p>The new block-based cart and checkout pages were created using inbuild react and are really fast and optimized.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"715\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/checkout-4-1200x715.webp\" alt=\"Custom item data on Checkout page.\" class=\"wp-image-523253\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/checkout-4-1200x715.webp 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/checkout-4-300x179.webp 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/checkout-4-250x149.webp 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/checkout-4-768x458.webp 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/checkout-4.webp 1488w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Adding the custom cart item data to the Order item<\/h2>\n\n\n\n<p>To add the custom cart item data to the order line item, we&#8217;ll use the WooCommerce action hook <strong>&#8216;woocommerce_checkout_create_order_line_item&#8217;<\/strong>.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/**\n * Adding sold by with order item.\n *\n * @param object $item \\WC_Order_Item_Product Order item object.\n * @param string $cart_item_key Cart Item key.\n * @param array  $values array of values.\n *\/\nfunction wk_add_sold_by_order_item_meta( $item, $cart_item_key, $values ) {\n\t$prod_id = isset( $values&#091;&#039;product_id&#039;] ) ? $values&#091;&#039;product_id&#039;] : 0;\n\tif ( $prod_id &gt; 0 ) {\n\t\t$author_id = get_post_field( &#039;post_author&#039;, $prod_id );\n\t\t$item-&gt;update_meta_data( esc_html__( &#039;Sold By&#039;, &#039;wk-marketplace&#039; ), get_the_author_meta( &#039;nicename&#039;, $author_id ) );\n\t}\n}\n\nadd_action( &#039;woocommerce_checkout_create_order_line_item&#039;, &#039;wk_add_sold_by_order_item_meta&#039;, 10, 3 );<\/pre>\n\n\n\n<p>This hook adds the custom cart item data to the order line item. Thats resutls in displaying the custom data on the WooCommerce Order thank you page as well in order edit page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1140\" height=\"824\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/order.webp\" alt=\"Custom cart item on thank you page.\" class=\"wp-image-523258\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/order.webp 1140w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/order-300x217.webp 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/order-250x181.webp 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/order-768x555.webp 768w\" sizes=\"(max-width: 1140px) 100vw, 1140px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p><strong>It will also add the data on admin order edit screen.<\/strong><\/p>\n\n\n\n<p>When the admin edits the order, the custom data &#8216;<strong>Sold By<\/strong>&#8216; will be shown along with the product title. Admin can easily identify the product listed by the shop manager from this information.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1353\" height=\"819\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/admin-order.webp\" alt=\"Custom cart itme data on admin Order Edit page\" class=\"wp-image-523262\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/admin-order.webp 1353w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/admin-order-300x182.webp 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/admin-order-1200x726.webp 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/admin-order-250x151.webp 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/admin-order-768x465.webp 768w\" sizes=\"(max-width: 1353px) 100vw, 1353px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Support<\/h2>\n\n\n\n<p>Thank you for reading this dev article. For any technical assistance, please reach out to us by email at\u00a0support@webkul.com<\/p>\n\n\n\n<p>Kindly visit\u00a0the <a href=\"https:\/\/store.webkul.com\/woocommerce-plugins.html\" target=\"_blank\" rel=\"noreferrer noopener\">WooCommerce Plugins<\/a>\u00a0page to add more features to your online store or get a <a href=\"https:\/\/webkul.com\/wordpress-theme-development-services\/\">Custom WordPress Theme<\/a> for your store. Also, you may <a href=\"https:\/\/webkul.com\/hire-woocommerce-developers\/\" target=\"_blank\" rel=\"noreferrer noopener\">hire WooCommerce Developers<\/a> to work on your projects.<\/p>\n\n\n\n<p>Have a Great Day Ahead!<\/p>\n\n\n\n<p>See you in the next post. Keep reading \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WooCommerce allows you to add your own custom cart item data by utilizing the hooks. Here&#8217;s a step-by-step guide on how to display custom cart item data in WooCommerce: Add the code below to your Child theme&#8217;s functions.php file It&#8217;s recommended to create and use a child to ensure your modifications are not lost during <a href=\"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":498,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1773],"tags":[1258,13679,1501],"class_list":["post-389440","post","type-post","status-publish","format-standard","hentry","category-woocommerce","tag-wordpress","tag-wordpress-development-services","tag-wordpress-plugin"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Add Custom Cart Item Data in WooCommerce?<\/title>\n<meta name=\"description\" content=\"WooCommerce lets you add your own custom cart item data using WooCommerce hooks and other methods like Elementor.\" \/>\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-cart-item-data-in-woocommerce\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Add Custom Cart Item Data in WooCommerce?\" \/>\n<meta property=\"og:description\" content=\"WooCommerce lets you add your own custom cart item data using WooCommerce hooks and other methods like Elementor.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-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-07-07T13:28:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-22T13:07:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item.webp\" \/>\n<meta name=\"author\" content=\"Dinesh Yadav\" \/>\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=\"Dinesh Yadav\" \/>\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-cart-item-data-in-woocommerce\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/\"},\"author\":{\"name\":\"Dinesh Yadav\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/a2c513ba357ca0781d2ea37d9da0f076\"},\"headline\":\"How to Add Custom Cart Item Data in WooCommerce?\",\"datePublished\":\"2023-07-07T13:28:34+00:00\",\"dateModified\":\"2026-01-22T13:07:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/\"},\"wordCount\":333,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item.webp\",\"keywords\":[\"wordpress\",\"wordpress development services\",\"wordpress plugin\"],\"articleSection\":[\"WooCommerce\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/\",\"name\":\"How To Add Custom Cart Item Data in WooCommerce?\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item.webp\",\"datePublished\":\"2023-07-07T13:28:34+00:00\",\"dateModified\":\"2026-01-22T13:07:38+00:00\",\"description\":\"WooCommerce lets you add your own custom cart item data using WooCommerce hooks and other methods like Elementor.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item.webp\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item.webp\",\"width\":1514,\"height\":708},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Add Custom Cart Item Data 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\/a2c513ba357ca0781d2ea37d9da0f076\",\"name\":\"Dinesh Yadav\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/deaa9c46b9b57fbb117ac9a9e51ff5835f9320bd26661dd55bb9a162fc24d905?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\/deaa9c46b9b57fbb117ac9a9e51ff5835f9320bd26661dd55bb9a162fc24d905?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Dinesh Yadav\"},\"description\":\"Dinesh Yadav, a seasoned Technical Project Manager in the WordPress department, excels in Marketplace Development Services. With deep expertise in WooCommerce modules. He crafts tailored solutions, optimizing performance and ensuring seamless user experiences for complex, scalable online marketplaces.\",\"url\":\"https:\/\/webkul.com\/blog\/author\/dineshyadav-wp\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Add Custom Cart Item Data in WooCommerce?","description":"WooCommerce lets you add your own custom cart item data using WooCommerce hooks and other methods like Elementor.","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-cart-item-data-in-woocommerce\/","og_locale":"en_US","og_type":"article","og_title":"How To Add Custom Cart Item Data in WooCommerce?","og_description":"WooCommerce lets you add your own custom cart item data using WooCommerce hooks and other methods like Elementor.","og_url":"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-07-07T13:28:34+00:00","article_modified_time":"2026-01-22T13:07:38+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item.webp","type":"","width":"","height":""}],"author":"Dinesh Yadav","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Dinesh Yadav","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/"},"author":{"name":"Dinesh Yadav","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/a2c513ba357ca0781d2ea37d9da0f076"},"headline":"How to Add Custom Cart Item Data in WooCommerce?","datePublished":"2023-07-07T13:28:34+00:00","dateModified":"2026-01-22T13:07:38+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/"},"wordCount":333,"commentCount":1,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item.webp","keywords":["wordpress","wordpress development services","wordpress plugin"],"articleSection":["WooCommerce"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/","url":"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/","name":"How To Add Custom Cart Item Data in WooCommerce?","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item.webp","datePublished":"2023-07-07T13:28:34+00:00","dateModified":"2026-01-22T13:07:38+00:00","description":"WooCommerce lets you add your own custom cart item data using WooCommerce hooks and other methods like Elementor.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item.webp","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/07\/cart-item.webp","width":1514,"height":708},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-add-custom-cart-item-data-in-woocommerce\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Add Custom Cart Item Data 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\/a2c513ba357ca0781d2ea37d9da0f076","name":"Dinesh Yadav","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/deaa9c46b9b57fbb117ac9a9e51ff5835f9320bd26661dd55bb9a162fc24d905?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\/deaa9c46b9b57fbb117ac9a9e51ff5835f9320bd26661dd55bb9a162fc24d905?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Dinesh Yadav"},"description":"Dinesh Yadav, a seasoned Technical Project Manager in the WordPress department, excels in Marketplace Development Services. With deep expertise in WooCommerce modules. He crafts tailored solutions, optimizing performance and ensuring seamless user experiences for complex, scalable online marketplaces.","url":"https:\/\/webkul.com\/blog\/author\/dineshyadav-wp\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/389440","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\/498"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=389440"}],"version-history":[{"count":31,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/389440\/revisions"}],"predecessor-version":[{"id":523278,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/389440\/revisions\/523278"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=389440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=389440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=389440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}