Want to make WCFM marketplace IMG required when adding new product
-
Hello everybody ??
I started to work a little with WCFM marketplace (free) – checking how it can work/help..
I am not a PRO in PHP – just beginner..
Want to make PHOTO field required when vendors adding new product in their stores.
Found a code to make required price field – it looks understandable..
Tried to use same code – changed IDs, did not change variables names (cause they should be using just in this function, I think – if I am wrong, tell me that I am not right ?? )function wcfm_required_product_fields_pricing( $price_fields, $product_id, $product_type ) {
if( isset( $price_fields['featured_img_display'] ) ) {
$price_fields['featured_img_display']['custom_attributes'] = array( 'required' => 1 );
}
return $price_fields;
}
add_filter( 'wcfm_product_manage_fields_pricing', 'wcfm_required_product_fields_pricing', 50, 3 );And it not work and I think because, I think, I need to change filter names (ex.
wcfm_product_manage_fields_pricing
)..
Tried to find WCFM filters names with no luck..
PLease tell me the correct way and method (would be great with a code) how to make IMG field REQUIRED, please.. ??
- The topic ‘Want to make WCFM marketplace IMG required when adding new product’ is closed to new replies.