{"id":404723,"date":"2023-11-01T11:19:34","date_gmt":"2023-11-01T11:19:34","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=404723"},"modified":"2024-05-28T13:03:59","modified_gmt":"2024-05-28T13:03:59","slug":"how-to-create-custom-product-type-in-woocommerce","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/","title":{"rendered":"How to Create Custom Product Type in WooCommerce?"},"content":{"rendered":"\n<p>In this dev blog article, we will learn how we can create a custom product type in the WooCommerce online store.<\/p>\n\n\n\n<p>Creating a custom product type in WooCommerce can be a more advanced customization, and it usually requires some coding knowledge. <\/p>\n\n\n\n<p>Custom product types allow you to add products with unique features and functionality beyond the standard simple, variable, or grouped product types. <\/p>\n\n\n\n<p>Here&#8217;s a general guide on how to create custom product types in WooCommerce:<\/p>\n\n\n\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h2 class=\"wp-block-heading index-title\">Step 1: Create a Custom Plugin<\/h2>\n<\/div><\/div>\n\n\n\n<p>First of all, create a directory for your new <a href=\"https:\/\/store.webkul.com\/woocommerce-plugins.html\" target=\"_blank\" rel=\"noreferrer noopener\">WooCommerce plugin<\/a> in the plugins directory path i.e. \u2018\/wp-content\/plugins\/\u2019. <\/p>\n\n\n\n<p>In my case, the directory name is \u2018wkwc-custom-product-type\u2019 you can change your directory name as you want.<\/p>\n\n\n\n<p>Next, Open this folder in your preferred text editor and create a php file like \u2018wkwc-custom-product-type.php\u2019.<\/p>\n\n\n\n<p>Put the following header comments in the PHP file to make this a plugin file.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/**\n * Plugin Name: WooCommerce Custom Product Type\n * Description: Create a custom product type.\n * Version: 1.0.0\n * Author: Webkul\n *\n * @package WooCommerce Custom Product Type\n *\/<\/pre>\n\n\n\n<p>You can change the above information to match your details.<\/p>\n\n\n\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h2 class=\"wp-block-heading index-title\">Step 2: Define Your Custom Product Type<\/h2>\n<\/div><\/div>\n\n\n\n<p>Create a new PHP file &#8216;class-wc-product-wkwc-custom-product.php&#8217; in the &#8216;plugins\/wkwc-custom-product-type\/include\/&#8217; folder, and define your custom product type. Here&#8217;s a basic example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\/**\n * Define custom product type.\n *\n * @package WooCommerce Custom Product Type\n *\/\n\ndefined( &#039;ABSPATH&#039; ) || exit(); \/\/ Exit if accessed directly.\n\nif ( ! class_exists( &#039;WC_Product_Wkwc_Custom_Product&#039; ) ) {\n\n\t\/**\n\t * Custom Product class.\n\t *\/\n\tclass WC_Product_Wkwc_Custom_Product extends WC_Product {\n\n\t\t\/**\n\t\t * Constructor of this class.\n\t\t *\n\t\t * @param object $product product.\n\t\t *\/\n\t\tpublic function __construct( $product ) {\n\t\t\t$this-&gt;product_type = &#039;wkwc_custom_product&#039;;\n\t\t\t$this-&gt;virtual      = &#039;yes&#039;;\n\t\t\t$this-&gt;supports&#091;]   = &#039;ajax_add_to_cart&#039;;\n\n\t\t\tparent::__construct( $product );\n\t\t}\n\n\t\t\/**\n\t\t * Return the product type.\n\t\t *\n\t\t * @return string\n\t\t *\/\n\t\tpublic function get_type() {\n\t\t\treturn &#039;wkwc_custom_product&#039;;\n\t\t}\n\n\t}\n}<\/pre>\n\n\n\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h2 class=\"wp-block-heading index-title\">Step 3: Add the Code for Handling the WooCommerce Custom Product Type<\/h2>\n<\/div><\/div>\n\n\n\n<p>Now, add the below code to the plugin&#8217;s main file i.e. &#8216;wkwc-custom-product-type.php&#8217; for handling the WooCommerce Custom Product Type.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\/**\n * Plugin Name: WooCommerce Custom Product Type\n * Description: Create a custom product type.\n * Version: 1.0.0\n * Author: Webkul\n * Domain Path: \/languages\n * Text Domain: wkcp\n *\n * @package WooCommerce Custom Product Type\n *\/\n\ndefined( &#039;ABSPATH&#039; ) || exit(); \/\/ Exit if accessed directly.\n\n\/\/ Define Constants.\ndefined( &#039;WCPOSGC_PLUGIN_FILE&#039; ) || define( &#039;WCPOSGC_PLUGIN_FILE&#039;, plugin_dir_path( __FILE__ ) );\n\nif ( ! class_exists( &#039;Wkwc_Custom_Product_Type&#039; ) ) {\n\n\t\/**\n\t * Custom product type class.\n\t *\/\n\tclass Wkwc_Custom_Product_Type {\n\n\t\t\/**\n\t\t * Constructor.\n\t\t *\/\n\t\tpublic function __construct() {\n\t\t\tadd_action( &#039;woocommerce_loaded&#039;, array( $this, &#039;wkwc_load_include_custom_product&#039; ) );\n\n\t\t\tadd_filter( &#039;product_type_selector&#039;, array( $this, &#039;wkwc_add_custom_product_type&#039; ) );\n\n\t\t\tadd_filter( &#039;woocommerce_product_data_tabs&#039;, array( $this, &#039;wkwc_modify_woocommerce_product_data_tabs&#039; ) );\n\n\t\t\tadd_action( &#039;woocommerce_product_data_panels&#039;, array( $this, &#039;wkwc_add_product_data_tab_content&#039; ) );\n\n\t\t\tadd_action( &#039;save_post&#039;, array( $this, &#039;wkwc_save_custom_product_fields&#039; ) );\n\n\t\t\tadd_action( &#039;woocommerce_wkwc_custom_product_add_to_cart&#039;, array( $this, &#039;wkwc_display_add_to_cart_button_on_single&#039; ), 30 );\n\n\t\t\tadd_filter( &#039;woocommerce_product_add_to_cart_text&#039;, array( $this, &#039;wkwc_add_to_cart_text&#039; ), 10, 2 );\n\t\t}\n\n\t\t\/**\n\t\t * Load custom product.\n\t\t *\/\n\t\tpublic function wkwc_load_include_custom_product() {\n\t\t\trequire_once WCPOSGC_PLUGIN_FILE . &#039;includes\/class-wc-product-wkwc-custom-product.php&#039;;\n\t\t}\n\n\t\t\/**\n\t\t * Custom product type.\n\t\t *\n\t\t * @param array $types Product types.\n\t\t *\n\t\t * @return void\n\t\t *\/\n\t\tpublic function wkwc_add_custom_product_type( $types ) {\n\t\t\t$types&#091;&#039;wkwc_custom_product&#039;] = esc_html__( &#039;Custom Product&#039;, &#039;wkcp&#039; );\n\n\t\t\treturn $types;\n\t\t}\n\n\t\t\/**\n\t\t * Modify product data tabs.\n\t\t *\n\t\t * @param array $tabs List of product data tabs.\n\t\t *\n\t\t * @return array $tabs Product data tabs.\n\t\t *\/\n\t\tpublic function wkwc_modify_woocommerce_product_data_tabs( $tabs ) {\n\t\t\tif ( &#039;product&#039; === get_post_type() ) {\n\t\t\t\t?&gt;\n\t\t\t\t\t&lt;script type=&#039;text\/javascript&#039;&gt;\n\t\t\t\t\t\t document.addEventListener(&#039;DOMContentLoaded&#039;, () =&gt; {\n\t\t\t\t\t\t\tlet optionGroupPricing = document.querySelector(&#039;.options_group.pricing&#039;);\n\t\t\t\t\t\t\t!!optionGroupPricing &amp;&amp; optionGroupPricing.classList.add(&#039;show_if_wkwc_custom_product&#039;);\n\n\t\t\t\t\t\t\tlet stockManagement = document.querySelector(&#039;._manage_stock_field&#039;);\n\t\t\t\t\t\t\t!!stockManagement &amp;&amp; stockManagement.classList.add(&#039;show_if_wkwc_custom_product&#039;);\n\n\t\t\t\t\t\t\tlet soldIndividuallyDiv = document.querySelector(&#039;.inventory_sold_individually&#039;);\n\t\t\t\t\t\t\tlet soldIndividually = document.querySelector(&#039;._sold_individually_field&#039;);\n\t\t\t\t\t\t\t!!soldIndividuallyDiv &amp;&amp; soldIndividuallyDiv.classList.add(&#039;show_if_wkwc_custom_product&#039;);\n\t\t\t\t\t\t\t!!soldIndividually &amp;&amp; soldIndividually.classList.add(&#039;show_if_wkwc_custom_product&#039;);\n\n\t\t\t\t\t\t\t&lt;?php if ( &#039;yes&#039; === get_option( &#039;woocommerce_calc_taxes&#039; ) ) { ?&gt;\n\t\t\t\t\t\t\t\tlet generalProductData = document.querySelectorAll(&#039;#general_product_data &gt; .options_group&#039;);\n\t\t\t\t\t\t\t\tlet taxDiv = !!generalProductData &amp;&amp; Array.from(generalProductData).at(-1);\n\t\t\t\t\t\t\t\t!!taxDiv &amp;&amp; taxDiv.classList.add(&#039;show_if_wkwc_custom_product&#039;);\n\t\t\t\t\t\t\t&lt;?php } ?&gt;\n\t\t\t\t\t\t });\n\t\t\t\t\t &lt;\/script&gt;\n\t\t\t\t&lt;?php\n\t\t\t}\n\n\t\t\tforeach ( $tabs as $key =&gt; $val ) {\n\t\t\t\t$product_tabs = array( &#039;general&#039;, &#039;inventory&#039; );\n\n\t\t\t\tif ( ! in_array( $key, $product_tabs ) ) {\n\t\t\t\t\t$tabs&#091; $key ]&#091;&#039;class&#039;]&#091;] = &#039;hide_if_wkwc_custom_product&#039;;\n\t\t\t\t} else {\n\t\t\t\t\t$tabs&#091;&#039;inventory&#039;]&#091;&#039;class&#039;]&#091;] = &#039;show_if_wkwc_custom_product&#039;;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\/\/ Add your custom product data tabs.\n\t\t\t$custom_tab = array(\n\t\t\t\t&#039;wkwc_custom&#039; =&gt; array(\n\t\t\t\t\t&#039;label&#039;    =&gt; __( &#039;Custom product settings&#039;, &#039;wkcp&#039; ),\n\t\t\t\t\t&#039;target&#039;   =&gt; &#039;wkwc_cusotm_product_data_html&#039;,\n\t\t\t\t\t&#039;class&#039;    =&gt; array( &#039;show_if_wkwc_custom_product&#039; ),\n\t\t\t\t\t&#039;priority&#039; =&gt; 21,\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn array_merge( $tabs, $custom_tab );\n\t\t}\n\n\t\t\/**\n\t\t * Add product data tab content.\n\t\t *\n\t\t * @return void\n\t\t *\/\n\t\tpublic function wkwc_add_product_data_tab_content() {\n\t\t\tglobal $product_object;\n\n\t\t\t?&gt;\n\t\t\t&lt;div id=&quot;wkwc_cusotm_product_data_html&quot; class=&quot;panel woocommerce_options_panel&quot;&gt;\n\t\t\t\t&lt;div class=&quot;options_group&quot;&gt;\n\t\t\t\t\t&lt;?php\n\t\t\t\t\t\twoocommerce_wp_text_input(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t&#039;id&#039;          =&gt; &#039;_wkwc_name&#039;,\n\t\t\t\t\t\t\t\t&#039;label&#039;       =&gt; esc_html__( &#039;Name&#039;, &#039;wkcp&#039; ),\n\t\t\t\t\t\t\t\t&#039;value&#039;       =&gt; $product_object-&gt;get_meta( &#039;_wkwc_name&#039;, true ),\n\t\t\t\t\t\t\t\t&#039;default&#039;     =&gt; &#039;&#039;,\n\t\t\t\t\t\t\t\t&#039;placeholder&#039; =&gt; esc_html__( &#039;Enter your name&#039;, &#039;wkcp&#039; ),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t?&gt;\n\t\t\t\t&lt;\/div&gt;\n\t\t\t&lt;\/div&gt;\n\t\t\t&lt;?php\n\t\t}\n\n\t\t\/**\n\t\t * Save custom product fields function.\n\t\t *\n\t\t * @param int $post_id Post id.\n\t\t *\n\t\t * @return void\n\t\t *\/\n\t\tpublic function wkwc_save_custom_product_fields( $post_id ) {\n\t\t\tif ( ! empty( $_POST&#091;&#039;meta-box-order-nonce&#039;] ) &amp;&amp; wp_verify_nonce( sanitize_text_field( $_POST&#091;&#039;meta-box-order-nonce&#039;] ), &#039;meta-box-order&#039; ) ) {\n\t\t\t\t$post_data = ! empty( $_POST ) ? wc_clean( $_POST ) : array();\n\n\t\t\t\tif ( ! empty( $post_data&#091;&#039;post_type&#039;] ) &amp;&amp; &#039;product&#039; === $post_data&#091;&#039;post_type&#039;] &amp;&amp; ! empty( $post_data&#091;&#039;product-type&#039;] ) &amp;&amp; &#039;wkwc_custom_product&#039; === $post_data&#091;&#039;product-type&#039;] ) {\n\t\t\t\t\t$name = ! empty( $post_data&#091;&#039;_wkwc_name&#039;] ) ? $post_data&#091;&#039;_wkwc_name&#039;] : &#039;&#039;;\n\n\t\t\t\t\tupdate_post_meta( $post_id, &#039;_wkwc_name&#039;, $name );\n\t\t\t\t\tupdate_post_meta( $post_id, &#039;_virtual&#039;, &#039;yes&#039; );\n\t\t\t\t\tupdate_post_meta( $post_id, &#039;_wkwc_custom_product_meta_key&#039;, &#039;yes&#039; );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\/**\n\t\t * Display add to cart button on single product page.\n\t\t *\n\t\t * @return void\n\t\t *\/\n\t\tpublic function wkwc_display_add_to_cart_button_on_single() {\n\t\t\twc_get_template( &#039;single-product\/add-to-cart\/simple.php&#039; );\n\t\t}\n\n\t\t\/**\n\t\t * Add to cart text on the gift card product.\n\t\t *\n\t\t * @param string $text Text on add to cart button.\n\t\t * @param object $product Product data.\n\t\t *\n\t\t * @return string $text Text on add to cart button.\n\t\t *\/\n\t\tpublic function wkwc_add_to_cart_text( $text, $product ) {\n\t\t\tif ( &#039;wkwc_custom_product&#039; === $product-&gt;get_type() ) {\n\t\t\t\t$text = $product-&gt;is_purchasable() &amp;&amp; $product-&gt;is_in_stock() ? __( &#039;Add to cart&#039;, &#039;wkcp&#039; ) : $text;\n\t\t\t}\n\n\t\t\treturn $text;\n\t\t}\n\n\t}\n}\n\nnew Wkwc_Custom_Product_Type();<\/pre>\n\n\n\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h2 class=\"wp-block-heading index-title\">Step 4: Save and activate the plugin<\/h2>\n<\/div><\/div>\n\n\n\n<p>Once you have added the code to the main plugin file, save the file and activate the plugin in the WordPress admin panel. <\/p>\n\n\n\n<p>To activate the plugin, go to the \u201cPlugins\u201d menu and find the plugin you just created. Click \u201cActivate\u201d to enable the plugin.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"266\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin-1200x266.png\" alt=\"activate_plugin\" class=\"wp-image-408706\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin-1200x266.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin-300x67.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin-250x55.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin-768x170.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin.png 1321w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h2 class=\"wp-block-heading index-title\">Step 5: Create a custom product<\/h2>\n<\/div><\/div>\n\n\n\n<p>To create a custom product, go to WordPress admin <strong>Product &gt; Add New<\/strong> &amp; select your custom product type. See the below image:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1043\" height=\"506\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/add_custom_product.png\" alt=\"add_custom_product\" class=\"wp-image-408707\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/add_custom_product.png 1043w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/add_custom_product-300x146.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/add_custom_product-250x121.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/add_custom_product-768x373.png 768w\" sizes=\"(max-width: 1043px) 100vw, 1043px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h2 class=\"wp-block-heading index-title\">Step 6: WooCommerce Front-View<\/h2>\n<\/div><\/div>\n\n\n\n<p>In the front end, you can see your custom product. Here is the screenshot of your custom product on the WooCommerce single product page:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"889\" height=\"477\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/custom_product_on_single_product_page.png\" alt=\"custom_product_on_single_product_page\" class=\"wp-image-408710\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/custom_product_on_single_product_page.png 889w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/custom_product_on_single_product_page-300x161.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/custom_product_on_single_product_page-250x134.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/custom_product_on_single_product_page-768x412.png 768w\" sizes=\"(max-width: 889px) 100vw, 889px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>That&#8217;s all about &#8220;How to create a custom product type in WooCommerce&#8221;. Thanks for your time!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Support<\/h2>\n\n\n\n<p>If you need any technical assistance, please reach us by mail at\u00a0support@webkul.com additionally, if you can\u00a0<a href=\"https:\/\/webkul.com\/hire-woocommerce-developers\/\" target=\"_blank\" rel=\"noreferrer noopener\">Hire WooCommerce Developers<\/a>\u00a0for your next project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this dev blog article, we will learn how we can create a custom product type in the WooCommerce online store. Creating a custom product type in WooCommerce can be a more advanced customization, and it usually requires some coding knowledge. Custom product types allow you to add products with unique features and functionality beyond <a href=\"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-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,7966,1260],"tags":[7235],"class_list":["post-404723","post","type-post","status-publish","format-standard","hentry","category-woocommerce","category-wordpress-woocommerce","category-wordpress","tag-custom-product-type"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create Custom Product Type in WooCommerce Store?<\/title>\n<meta name=\"description\" content=\"Learn how to create custom product type in WooCommerce with using custom code with more features other than simple, variable and grouped.\" \/>\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-create-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 Custom Product Type in WooCommerce Store?\" \/>\n<meta property=\"og:description\" content=\"Learn how to create custom product type in WooCommerce with using custom code with more features other than simple, variable and grouped.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-create-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=\"2023-11-01T11:19:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-28T13:03:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin-1200x266.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-create-custom-product-type-in-woocommerce\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/\"},\"author\":{\"name\":\"Raushan Kumar Paswan\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/db36277344bb56e4917bf0211aec8793\"},\"headline\":\"How to Create Custom Product Type in WooCommerce?\",\"datePublished\":\"2023-11-01T11:19:34+00:00\",\"dateModified\":\"2024-05-28T13:03:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/\"},\"wordCount\":379,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin-1200x266.png\",\"keywords\":[\"Custom Product Type\"],\"articleSection\":[\"WooCommerce\",\"WooCommerce\",\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/\",\"name\":\"How to Create Custom Product Type in WooCommerce Store?\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin-1200x266.png\",\"datePublished\":\"2023-11-01T11:19:34+00:00\",\"dateModified\":\"2024-05-28T13:03:59+00:00\",\"description\":\"Learn how to create custom product type in WooCommerce with using custom code with more features other than simple, variable and grouped.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin.png\",\"width\":1321,\"height\":293,\"caption\":\"activate_plugin\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create Custom Product Type 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":"How to Create Custom Product Type in WooCommerce Store?","description":"Learn how to create custom product type in WooCommerce with using custom code with more features other than simple, variable and grouped.","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-create-custom-product-type-in-woocommerce\/","og_locale":"en_US","og_type":"article","og_title":"How to Create Custom Product Type in WooCommerce Store?","og_description":"Learn how to create custom product type in WooCommerce with using custom code with more features other than simple, variable and grouped.","og_url":"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-11-01T11:19:34+00:00","article_modified_time":"2024-05-28T13:03:59+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin-1200x266.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-create-custom-product-type-in-woocommerce\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/"},"author":{"name":"Raushan Kumar Paswan","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/db36277344bb56e4917bf0211aec8793"},"headline":"How to Create Custom Product Type in WooCommerce?","datePublished":"2023-11-01T11:19:34+00:00","dateModified":"2024-05-28T13:03:59+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/"},"wordCount":379,"commentCount":3,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin-1200x266.png","keywords":["Custom Product Type"],"articleSection":["WooCommerce","WooCommerce","WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/","url":"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/","name":"How to Create Custom Product Type in WooCommerce Store?","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin-1200x266.png","datePublished":"2023-11-01T11:19:34+00:00","dateModified":"2024-05-28T13:03:59+00:00","description":"Learn how to create custom product type in WooCommerce with using custom code with more features other than simple, variable and grouped.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/activate_plugin.png","width":1321,"height":293,"caption":"activate_plugin"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-product-type-in-woocommerce\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Create Custom Product Type 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\/404723","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=404723"}],"version-history":[{"count":18,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/404723\/revisions"}],"predecessor-version":[{"id":444074,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/404723\/revisions\/444074"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=404723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=404723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=404723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}