• I have created custom product types in Woocommerce but they are not pulling through into WCFM.

    I have the option of adding these new custom product types as filters in the add product and vendor capabilities screens in WCFM but this is just a cosmetic change with linkage to the custom product types I created in WooCommerce. Because it is only cosmetic I can set the permissions for a vendor to only be able to select a specific product type but when they go to the add product page they see all of the custom product types (as the drop down is in no way linked to their permissions)

    The code I have used to make the custom types visible in WCFM is:

    add_filter( 'wcfm_product_types', function( $pro_types ) {
    	$pro_types['LPM'] = __( 'Lego Party Machinery', 'woocommerce' );
    	return $pro_types;
    }, 50 );
    
    //Adds toggle to vendor custom capabilities
    add_filter( 'wcfm_capability_settings_fields_product_types', function( $prod_types, $capability_handler, $capability_manager_options ) {
    	$new_product = ( isset( $capability_manager_options['LPM'] ) ) ? $capability_manager_options['LPM'] : 'no';
    	$prod_types['LPM'] = array('label' => __('LPM', 'wc-frontend-manager') , 'name' => $capability_handler.'[LPM]','type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'no', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $new_product);
    	return $prod_types;
    }, 50, 3 );

    I used this tutorial for the custom product types

    https://webkul.com/blog/create-a-custom-product-type-in-woocommerce/

    How can I get WCFM displaying the Product Types in WooCommerce rather than creating custom filters in WCFM that are independent.

    Hope that makes sense!

  • The topic ‘Custom Product Types Not Showing WCFM’ is closed to new replies.