Extends custom product type from woocommerce

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Feature Request Extends custom product type from woocommerce

This topic contains 4 replies, has 3 voices, and was last updated by WCFM Forum WCFM Forum 3 months, 2 weeks ago.

  • Author
    Posts
  • #81139
    Avatar
    jaliascv
    Participant

    Hi. is there any way the woocommerce custom product types are automatically loaded into wcfm ?

    thanks!

  • #81152
    Avatar
    jaliascv
    Participant

    hi i managed to add custom product type. but need to modify many files as the list array are mostly hardcoded. thanks!

  • #81713
    WCFM Forum
    WCFM Forum
    Keymaster

    Hi,

    No, you don not require to edit any core file.

    You may add new product type using this code snippet –

    add_filter( 'wcfm_product_types', function( $pro_types ) {
    	$pro_types['new_product'] = __( 'New Product', 'woocommerce' );
    	return $pro_types;
    }, 50 );

    Thank You

  • #89376
    Avatar
    rockprince7
    Participant
    This reply has been marked as private.
  • #91003
    WCFM Forum
    WCFM Forum
    Keymaster

    HI,

    Well, that code is only for adding new product type under WCFM Product manager.

    But before doing that you have to register a new product type for WooCommerce.

    You may check this for the purpose – https://webkul.com/blog/create-a-custom-product-type-in-woocommerce/

    Thank YOu

You must be logged in to reply to this topic.