WordPress.org

Support

Support » Plugins and Hacks » WooCommerce » [Resolved] Where are product type forms being loaded from?

[Resolved] Where are product type forms being loaded from?

  • Hello,

    I wish to extend the Woocommerce plugin but I have ran into a little problem.
    In the admin panel under Products. Whether adding or editing products, there is the section called Product Data and there is a dropdown where you can choose the product type. I researched it a bit and found out it is loaded in with ajax. My question is where are these forms being loaded in from? I looked around but didn’t manage to find the place.

    Regards,
    Carlos

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The product types are loaded in

    woocommerce/admin/post-types/writepanel/writepanel-product_data.php

    In there you will find this:

    $product_type_selector = apply_filters( 'product_type_selector', array(
    		'simple' 	=> __( 'Simple product', 'woocommerce' ),
    		'grouped' 	=> __( 'Grouped product', 'woocommerce' ),
    		'external' 	=> __( 'External/Affiliate product', 'woocommerce' )
    	), $product_type );

    So as you can see, you need to create a filter to add / remove types.

    Thank-you for your reply.
    But how would I go on about modifying a form that belongs to a certain product type?
    As in where can I add new fields to a certain product type form like e.g. this: http://www.upload.ee/image/3242384/Untitled.png?

    I found the forms. I’m closing the topic.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Where are product type forms being loaded from?’ is closed to new replies.
Skip to toolbar