HI,
You will require just this code to add new product type under WCFM Product Manager –
add_filter( 'wcfm_product_types', function( $pro_types ) {
$pro_types['test_pro'] = __( 'Test Pro', 'wcfm' );
return $pro_types;
}, 50 );
Thank You
Thread Starter
jalvkb
(@jalvkb)
Hi,
Thanks for the reply
I used filter as you mentioned(wcfm_product_types) to add new custom product type, then i added new custom fields to product form and now i want to save that field’s data to my tables when form is submitted.
So using which hook, i can do this ?
HI,
Well, if you have created custom field using WCFM custom fields – https://wclovers.com/knowledgebase/wcfm-custom-fields/
then those will be automatically saved, no additional code will require.
Otherwise you may use this hook to save additional data – do_action( 'after_wcfm_products_manage_meta_save', $new_product_id, $wcfm_products_manage_form_data );
Thank You
Thread Starter
jalvkb
(@jalvkb)
Ok, Thanks a lot for the help.