{"id":136730,"date":"2018-08-04T09:49:52","date_gmt":"2018-08-04T09:49:52","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=136730"},"modified":"2023-08-30T04:02:55","modified_gmt":"2023-08-30T04:02:55","slug":"create-a-custom-product-type-in-woocommerce","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/","title":{"rendered":"Woocommerce Custom Product Type"},"content":{"rendered":"\n<p>By default, WooCommerce boasts a repertoire of four distinct product types, each tailored to cater to diverse merchandising needs:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Simple Product<\/strong>: A straightforward product type without elaborate variations or complexities.<\/li>\n\n\n\n<li><strong>Variable Product<\/strong>: Ideal for items with multiple attributes and options, granting customers the freedom to choose.<\/li>\n\n\n\n<li><strong>External\/Affiliate Product<\/strong>: Designed for products available on external sites, allowing seamless redirection to affiliated platforms.<\/li>\n\n\n\n<li><strong>Downloadable Product<\/strong>: Suited for digital goods, enabling secure and efficient delivery of downloadable content.<\/li>\n<\/ol>\n\n\n\n<p>What if you need to add a new product type according to your needs?&nbsp;Having your own product type, allows you to have control over product settings. For example, you could set default values like price, visibility, etc.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Create a Custom WooCommerce Product Type?<\/h2>\n\n\n\n<p>Crafting a new WooCommerce product type is fairly straightforward but involves some coding. To proceed, gaining familiarity with crafting custom WordPress \/ <a href=\"https:\/\/store.webkul.com\/woocommerce-plugins.html\" target=\"_blank\" rel=\"noreferrer noopener\">WooCommerce plugins<\/a> and adding code is advised. <\/p>\n\n\n\n<p>In this guide, we will walk you through the process of creating a custom product type step by step. By the end of this article, you&#8217;ll be able to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Register a New Product Type<\/strong>: Define a new product type that suits your unique requirements, including adding a price option, virtual and downloadable checkboxes, and more.<\/li>\n\n\n\n<li><strong>Add a Corresponding Tab<\/strong>: Create a dedicated settings tab for your custom product type in the product editor.<\/li>\n\n\n\n<li><strong>Add Fields to the Created Tab<\/strong>: Populate the settings tab with custom fields that capture specific details for your product type.<\/li>\n\n\n\n<li><strong>Show Details on the Front Product Page<\/strong>: Display the information you&#8217;ve captured in the custom fields on the front-end product page.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Register Custom WooCommerce Product Type<\/h2>\n\n\n\n<p>In your WordPress admin panel, navigate to your WordPress installation directory and locate the <code><strong>wp-content\/plugins<\/strong><\/code> folder. Inside this folder, create a new directory named <code><strong>custom_product_type<\/strong><\/code>. Within this new directory, create a file named <code><strong>custom_product_type.php<\/strong><\/code><\/p>\n\n\n\n<p>Inside <code><strong>custom_product_type.php<\/strong><\/code>, start by defining your plugin:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:php\">&lt;?php\n\/**\n * Plugin Name: Custom Product Type\n * Description: Create a custom product type in WooCommerce\n * Author: Webkul\n * Author URI: https:\/\/webkul.com\/\n * Version: 1.0\n *\/\n\nif (!defined('ABSPATH')) {\n    return;\n}<\/pre>\n\n\n\n<p>Below code snippets show you how to register a new product type which executes at&nbsp;the &#8216;init&#8217;&nbsp;hook at the function file of the plugin.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:php\">add_action( 'init', 'register_demo_product_type' );\n\nfunction register_demo_product_type() {\n\n  class WC_Product_Demo extends WC_Product {\n\t\t\t\n    public function __construct( $product ) {\n        $this-&gt;product_type = 'demo';\n\tparent::__construct( $product );\n    }\n  }\n}<\/pre>\n\n\n\n<p>In the above code, we create a new product type as &#8216;demo&#8217; by extending the Woocommerce <strong>WC_Product class<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add Custom WooCommerce Product option<\/h2>\n\n\n\n<p>After registering the product type we need to add the product type to the product type selector for choosing what kind of product the user wants to make. For that, we added our new product type with the default product type provided by Woocommerce as shown in the below code.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:php\">add_filter( 'product_type_selector', 'wk_add_demo_product_type' );\n\nfunction wk_add_demo_product_type( $types ){\n    $types[ 'demo' ] = __( 'Demo product', 'dm_product' );\n\n    return $types;\t\n}<\/pre>\n\n\n\n<p>This code will add your custom product type to the Product data dropdown list using the $types[&#8216;demo&#8217;] = __( &#8216;Demo product&#8217;, &#8216;dm_product&#8217; ) line. You can change the text from Custom Product Type to anything such as Demo Product, Custom order, Gift card, etc.<\/p>\n\n\n\n<p>Now, open your WP Admin Dashboard and create a new product. Under the Product Type dropdown menu, you should see a new option named \u2018Demo Product.\u2019<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814.png\" alt=\"Woocommerce: product type dropdown list\" class=\"wp-image-397643\" style=\"width:729px;height:356px\" width=\"729\" height=\"356\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814.png 1252w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814-300x146.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814-1200x586.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814-250x122.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814-768x375.png 768w\" sizes=\"(max-width: 729px) 100vw, 729px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Adding a Custom Product Type Tab<\/h2>\n\n\n\n<p>After adding an option to select the new product type we need to add a new tab associated with it and we will add a field &#8216; Demo Product Spec &#8216; for describing the product type. Insert this code to forge the &#8220;Custom Product Details&#8221; tab:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:php\">add_filter( 'woocommerce_product_data_tabs', 'wk_demo_product_tab' );\n\nfunction wk_demo_product_tab( $tabs) {\n\t\t\n    $tabs['demo'] = array(\n      'label'\t =&gt; __( 'Demo Product', 'dm_product' ),\n      'target' =&gt; 'demo_product_options',\n      'class'  =&gt; 'show_if_demo_product',\n     );\n    return $tabs;\n}\n<\/pre>\n\n\n\n<p>Ensure to replace &#8216;demo&#8217; with your actual product_type ID in $tabs[&#8216;demo&#8217;] = array if you&#8217;ve created your own product_type earlier.<\/p>\n\n\n\n<p>The array comprises three parameters:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>label<\/strong>: Determines your custom product tab&#8217;s name.<\/li>\n\n\n\n<li><strong>target<\/strong>: Establishes an identifier for adding settings to the tab.<\/li>\n\n\n\n<li><strong>class<\/strong>: Employs show_if_Demo_product, displaying the tab solely when your custom product type is chosen.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/show-demo-tab-fotor-2023082912625-1200x591.png\" alt=\"Woocommerce: Custom Product Type Tab\" class=\"wp-image-397644\" style=\"width:816px;height:402px\" width=\"816\" height=\"402\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/show-demo-tab-fotor-2023082912625-1200x591.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/show-demo-tab-fotor-2023082912625-300x148.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/show-demo-tab-fotor-2023082912625-250x123.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/show-demo-tab-fotor-2023082912625-768x378.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/show-demo-tab-fotor-2023082912625.png 1274w\" sizes=\"(max-width: 816px) 100vw, 816px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Add Custom Product Type Tab Fields<\/h2>\n\n\n\n<p>To add the field to it we need to add the following code on <strong>&#8216;woocommerce_product_data_panels&#8217;<\/strong> hook.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:php\">add_action( 'woocommerce_product_data_panels', 'wk_demo_product_tab_product_tab_content' );\n\nfunction wk_demo_product_tab_product_tab_content() {\n\n ?&gt;&lt;div id='demo_product_options' class='panel woocommerce_options_panel'&gt;&lt;?php\n ?&gt;&lt;div class='options_group'&gt;&lt;?php\n\t\t\t\t\n    woocommerce_wp_text_input(\n\tarray(\n\t  'id' =&gt; 'demo_product_info',\n\t  'label' =&gt; __( 'Demo Product Spec', 'dm_product' ),\n\t  'placeholder' =&gt; '',\n\t  'desc_tip' =&gt; 'true',\n\t  'description' =&gt; __( 'Enter Demo product Info.', 'dm_product' ),\n\t  'type' =&gt; 'text'\n\t)\n    );\n ?&gt;&lt;\/div&gt;\n &lt;\/div&gt;&lt;?php\n}<\/pre>\n\n\n\n<p><br>This introduces a text field for the product, but you can expand the settings with various WooCommerce functions like woocommerce_wp_select() for dropdown lists, woocommerce_wp_textarea_input() for text areas, and more. Our demo focuses on exhibiting uncomplicated text details, which administrators can conveniently tailor from the backend.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/show-demo-fields-fotor-2023082912647-1200x587.png\" alt=\"Woocommerce: Custom Product Type Tab Fields\" class=\"wp-image-397646\" style=\"width:737px;height:360px\" width=\"737\" height=\"360\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/show-demo-fields-fotor-2023082912647-1200x587.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/show-demo-fields-fotor-2023082912647-300x147.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/show-demo-fields-fotor-2023082912647-250x122.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/show-demo-fields-fotor-2023082912647-768x375.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/show-demo-fields-fotor-2023082912647.png 1260w\" sizes=\"(max-width: 737px) 100vw, 737px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Saving Custom WooCommerce Product Type Tab Fields<\/h2>\n\n\n\n<p>To save those details we will use the hook <strong>&#8216; woocommerce_process_product_meta&#8217;<\/strong> and save the data in the post meta as shown in below code snippet below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:php\">add_action( 'woocommerce_process_product_meta', 'wk_save_demo_product_settings' );\n\t\nfunction wk_save_demo_product_settings( $post_id ){\n\t\t\n    $demo_product_info = $_POST['demo_product_info'];\n\t\t\n    if( !empty( $demo_product_info ) ) {\n\n\tupdate_post_meta( $post_id, 'demo_product_info', esc_attr( $demo_product_info ) );\n    }\n}<\/pre>\n\n\n\n<p>Now the admin side work is done. Now you will be able to select the new post type registered, see the new tab associated with it, and finally add the details in the field as shown below screenshot:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-34-fotor-20230829121828-1200x311.jpg\" alt=\"Save Custom WooCommerce Product Type Tab Fields\" class=\"wp-image-397653\" style=\"width:834px;height:216px\" width=\"834\" height=\"216\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-34-fotor-20230829121828-1200x311.jpg 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-34-fotor-20230829121828-300x78.jpg 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-34-fotor-20230829121828-250x65.jpg 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-34-fotor-20230829121828-768x199.jpg 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-34-fotor-20230829121828-1536x399.jpg 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/Screenshot-34-fotor-20230829121828.jpg 1553w\" sizes=\"(max-width: 834px) 100vw, 834px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Add Content for the Custom Product Type<\/h2>\n\n\n\n<p>At last, we need to show the information that we added to the demo product type on the product page.<\/p>\n\n\n\n<p>For that, we&#8217;ll execute the below code on the hook&nbsp; &#8216;<strong> woocommerce_single_product_summary &#8216;<\/strong>&nbsp; and add the details to the product page in the front as :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:php\">add_action( 'woocommerce_single_product_summary', 'wk_demo_product_front' );\n\t\nfunction wk_demo_product_front () {\n    global $product;\n\n    if ( 'demo' == $product-&gt;get_type() ) {  \t\n       echo( get_post_meta( $product-&gt;get_id(), 'demo_product_info' )[0] );\n\n  }\n}<\/pre>\n\n\n\n<p>After doing all this we&#8217;ll now see the demo product that we created in the front end with the information added to its custom field as shown below :<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"903\" height=\"455\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/front-screen-20230829122040.png\" alt=\"Content of Custom Product Type\" class=\"wp-image-397655\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/front-screen-20230829122040.png 903w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/front-screen-20230829122040-300x151.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/front-screen-20230829122040-250x126.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/front-screen-20230829122040-768x387.png 768w\" sizes=\"(max-width: 903px) 100vw, 903px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>Hope this blog will help you to develop custom functionality in your plugin in a better way.&nbsp;Try this and&nbsp;if you have any queries then&nbsp;just comment below.<\/p>\n\n\n\n<p>You may also <a href=\"https:\/\/webkul.com\/hire-woocommerce-developers\/\" target=\"_blank\" rel=\"noreferrer noopener\">hire WooCommerce developers<\/a> to work on your custom WooCommerce projects.<\/p>\n\n\n\n<p>Thanks for reading \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default, WooCommerce boasts a repertoire of four distinct product types, each tailored to cater to diverse merchandising needs: What if you need to add a new product type according to your needs?&nbsp;Having your own product type, allows you to have control over product settings. For example, you could set default values like price, visibility, <a href=\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":199,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7966,1260],"tags":[7235,1468],"class_list":["post-136730","post","type-post","status-publish","format-standard","hentry","category-wordpress-woocommerce","category-wordpress","tag-custom-product-type","tag-woocommerce"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create a Custom Product in WooCommerce Store?<\/title>\n<meta name=\"description\" content=\"In this dev guide we will learn how to create custom product in WooCommerce store.\" \/>\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\/create-a-custom-product-type-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 Create a Custom Product in WooCommerce Store?\" \/>\n<meta property=\"og:description\" content=\"In this dev guide we will learn how to create custom product in WooCommerce store.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-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=\"2018-08-04T09:49:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-30T04:02:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814.png\" \/>\n<meta name=\"author\" content=\"Nikhil Chaudhary\" \/>\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=\"Nikhil Chaudhary\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/\"},\"author\":{\"name\":\"Nikhil Chaudhary\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/312fd2a63ee03279d90e75c4e54bb6c6\"},\"headline\":\"Woocommerce Custom Product Type\",\"datePublished\":\"2018-08-04T09:49:52+00:00\",\"dateModified\":\"2023-08-30T04:02:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/\"},\"wordCount\":877,\"commentCount\":23,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814.png\",\"keywords\":[\"Custom Product Type\",\"WooCommerce\"],\"articleSection\":[\"WooCommerce\",\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/\",\"url\":\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/\",\"name\":\"How to Create a Custom Product in WooCommerce Store?\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814.png\",\"datePublished\":\"2018-08-04T09:49:52+00:00\",\"dateModified\":\"2023-08-30T04:02:55+00:00\",\"description\":\"In this dev guide we will learn how to create custom product in WooCommerce store.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814.png\",\"width\":1252,\"height\":611,\"caption\":\"product type dropdown list\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Woocommerce Custom Product Type\"}]},{\"@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\/312fd2a63ee03279d90e75c4e54bb6c6\",\"name\":\"Nikhil Chaudhary\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0f7cbf2960542a79718244837672a23a600dc055499fe56de52e4ff3c89df996?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\/0f7cbf2960542a79718244837672a23a600dc055499fe56de52e4ff3c89df996?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Nikhil Chaudhary\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/nikhilchaudhary-wordpress493\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create a Custom Product in WooCommerce Store?","description":"In this dev guide we will learn how to create custom product in WooCommerce store.","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\/create-a-custom-product-type-in-woocommerce\/","og_locale":"en_US","og_type":"article","og_title":"How to Create a Custom Product in WooCommerce Store?","og_description":"In this dev guide we will learn how to create custom product in WooCommerce store.","og_url":"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2018-08-04T09:49:52+00:00","article_modified_time":"2023-08-30T04:02:55+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814.png","type":"","width":"","height":""}],"author":"Nikhil Chaudhary","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Nikhil Chaudhary","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/"},"author":{"name":"Nikhil Chaudhary","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/312fd2a63ee03279d90e75c4e54bb6c6"},"headline":"Woocommerce Custom Product Type","datePublished":"2018-08-04T09:49:52+00:00","dateModified":"2023-08-30T04:02:55+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/"},"wordCount":877,"commentCount":23,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814.png","keywords":["Custom Product Type","WooCommerce"],"articleSection":["WooCommerce","WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/","url":"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/","name":"How to Create a Custom Product in WooCommerce Store?","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814.png","datePublished":"2018-08-04T09:49:52+00:00","dateModified":"2023-08-30T04:02:55+00:00","description":"In this dev guide we will learn how to create custom product in WooCommerce store.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/product_type_selector-fotor-2023082912814.png","width":1252,"height":611,"caption":"product type dropdown list"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/create-a-custom-product-type-in-woocommerce\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Woocommerce Custom Product Type"}]},{"@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\/312fd2a63ee03279d90e75c4e54bb6c6","name":"Nikhil Chaudhary","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0f7cbf2960542a79718244837672a23a600dc055499fe56de52e4ff3c89df996?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\/0f7cbf2960542a79718244837672a23a600dc055499fe56de52e4ff3c89df996?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Nikhil Chaudhary"},"url":"https:\/\/webkul.com\/blog\/author\/nikhilchaudhary-wordpress493\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/136730","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\/199"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=136730"}],"version-history":[{"count":27,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/136730\/revisions"}],"predecessor-version":[{"id":397938,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/136730\/revisions\/397938"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=136730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=136730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=136730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}