Best Multi Vendor Marketplace Plugin for WordPress › Forums › WCFM – Ultimate › Add Product | Downloadable File
- This topic has 3 replies, 2 voices, and was last updated 8 years, 3 months ago by
WCFM Forum.
- AuthorPosts
- July 26, 2018 at 12:26 am #26922
Jay
GuestHi,
If you check ‘downloadable’ in ‘Add Product’, it requires ‘Downloadable File’ to publish the product.
But I would like to leave it empty when publishing, as PDF Voucher does not require it and automatically make downloadable files.Could you provide code snippet to make ‘Downloadable File’ not mandatory?
Thanks in advance,
/Jay - July 26, 2018 at 4:51 pm #26979
WCFM Forum
MemberHi,
We will remove this validation check in next update.
Thank You
- August 14, 2018 at 2:54 pm #28535
Jay
GuestHello Team,
I believe this fix was implemented in 4.2.2 version.
But now in 4.2.3 it is made back to mandatory field as someone requested it:
https://wclovers.com/forums/topic/add-product-downloadable/I understand in general case this is supposed to be required field.
So would you be able to provide me code snippet to turn off required check for “Downloadable Name/File”?Thanks in advance,
Jay - August 16, 2018 at 8:21 am #28664
WCFM Forum
MemberHi,
Yeah right, people want to make those required otherwise “Downloadable Products” useless.
PDF Voucher is an exceptional case.
Kindly add this code to your site –
function wcfm_product_fields_custom_downloadable( $downloadable_fields, $product_id, $product_type ) { if( isset( $downloadable_fields['downloadable_files'] ) && isset( $downloadable_fields['downloadable_files']['options'] ) && isset( $downloadable_fields['downloadable_files']['options']['file'] ) ) { unset( $downloadable_fields['downloadable_files']['options']['file']['custom_attributes'] ); unset( $downloadable_fields['downloadable_files']['options']['name']['custom_attributes'] ); } return $downloadable_fields; } add_filter( 'wcfm_product_fields_downloadable', 'wcfm_product_fields_custom_downloadable', 20, 3 );Thank You
- AuthorPosts
- The topic ‘Add Product | Downloadable File’ is closed to new replies.