Home / Admin / Make the auction start price and auction dates required for vendors
Duplicate Snippet

Embed Snippet on Your Site

Make the auction start price and auction dates required for vendors

This is from the integration with the WooCommerce Simple Auctions plugin

Code Preview
php
<?php
/* WCV - Require auction start price and auction dates */
function wcv_make_field_required( $field ) {
	$field['custom_attributes']['required']                      = 'required';
	$field['custom_attributes']['data-parsley-required-message'] = __( 'This field is required.', 'wc-vendors' );
	return $field;
}
add_filter( 'wcv_simple_auctions_end_date', 'wcv_make_field_required' );
add_filter( 'wcv_simple_auctions_start_date', 'wcv_make_field_required' );
add_filter( 'wcv_simple_auctions_start_price', 'wcv_make_field_required' );

Comments

Add a Comment