WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] Where are product type forms being loaded from? (4 posts)

  1. DHNCarlos
    Member
    Posted 1 year ago #

    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/

  2. IgniteWoo
    Member
    Posted 1 year ago #

    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.

  3. DHNCarlos
    Member
    Posted 1 year ago #

    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?

  4. DHNCarlos
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic