Title: Custom Variable Product Type
Last modified: December 2, 2021

---

# Custom Variable Product Type

 *  Resolved [Howdy_McGee](https://wordpress.org/support/users/howdy_mcgee/)
 * (@howdy_mcgee)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/custom-variable-product-type-2/)
 * Hello,
 * I’m trying to extend WC_Product_Variable to create my own variable product type
   but am having trouble. I can show attributes on the custom product type but it
   doesn’t show the checkbox to “Use for Variations”. Looking at the WooCommerce
   code, it specifically has static a class `show_if_variable` which, while my product
   type is variable it’s not specifically called “variable”. Is there a resource,
   tutorial, or do you have any guidance on what I’m doing wrong when creating my
   own Variable product type? Here’s the code I’m using below:
 *     ```
       /* Create new product type class */
       function custom_product_types() {
   
       	Class Item_Registration_Variable extends \WC_Product_Variable {
   
       		public function __construct( $product = 0 ) {
   
       			$this->product_type = 'item_registration_variable';
       			parent::__construct( $product );
   
       		}
   
       		public function get_type() {
       			return $this->product_type;
       		}
   
       	}
   
       }
       add_action( 'init', 'custom_product_types' );
   
       /* Append product type to select */
       function append_custom_product_types( $product_types ) {
   
       	return array_merge( $product_types, array(
       		'item_registration_variable' => esc_html__( 'Item Registration' ),
       	) );
   
       }
       add_filter( 'product_type_selector', 'append_custom_product_types' );
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * (@margaretwporg)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/custom-variable-product-type-2/#post-15128608)
 * Hi [@howdy_mcgee](https://wordpress.org/support/users/howdy_mcgee/)
 * This is a fairly complex development topic. I’m going to leave it open for a 
   bit to see if anyone is able to chime in to help you out.
 * I can also recommend the following places for more development-oriented questions:
 * 1. WooCommerce Slack Community: [https://woocommerce.com/community-slack/](https://woocommerce.com/community-slack/)
 * 2. WooCommerce Community on Facebook: [https://www.facebook.com/groups/advanced.woocommerce/](https://www.facebook.com/groups/advanced.woocommerce/)
 *  Thread Starter [Howdy_McGee](https://wordpress.org/support/users/howdy_mcgee/)
 * (@howdy_mcgee)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/custom-variable-product-type-2/#post-15130167)
 * Hello,
 * Unfortunately, I don’t Facebook. The WooCommerce slack is nice, but I feel some
   actual documentation on extending product types would be super helpful. Not just
   for WooCommerce ease of development but also for plugin developers looking to
   contribute to the WooCommerce ecosystem.
 * It seems like there are some areas in the WooCommerce plugin where “variation”
   or “is_variaion” is static input making it challenging to extend. These areas
   could be improved.
 *  [Abiola Ogodo](https://wordpress.org/support/users/oaoyadeyi/)
 * (@oaoyadeyi)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/custom-variable-product-type-2/#post-15131651)
 * [@howdy_mcgee](https://wordpress.org/support/users/howdy_mcgee/)
 * Thanks for the feedback.
 * Kindly raise this in [https://ideas.woocommerce.com/forums/133476-woocommerce](https://ideas.woocommerce.com/forums/133476-woocommerce).
 * Our product team will assess it from there
 *  [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * (@margaretwporg)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/custom-variable-product-type-2/#post-15153606)
 * We’ve not seen any activity on this thread for a while, so I’m marking this thread
   as resolved. If you have further questions, please feel free to open a new topic.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Custom Variable Product Type’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [development](https://wordpress.org/support/topic-tag/development/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [variable product](https://wordpress.org/support/topic-tag/variable-product/)

 * 4 replies
 * 3 participants
 * Last reply from: [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/custom-variable-product-type-2/#post-15153606)
 * Status: resolved