• Resolved zeezov

    (@zeezov)


    Hi,

    I was wondering if i can somehow set the price for Vendors? For example i want i want my Vendors to be able to list products with prices between $1 – $30 only. So if Vendor wants to upload new product the price always have to be less than $30. Anything above $30 wont be accepted.

    I currently have Dokan and Woo commerce multi-vendor site

Viewing 1 replies (of 1 total)
  • Hello @zeezov ,

    You have to use some jQuery to do that safely.

    Here is a sample code that you can use to use the max, min in the price input field.

    add_action( 'wp_head', function() {
    	?>
    		<script>
    			jQuery(document).ready(function() {
    				jQuery("#_regular_price").removeAttr("type");
                                    jQuery("#_regular_price").attr("type", "number");
    				jQuery('#_regular_price').attr('max', '30');
    				jQuery('#_regular_price').attr('min', '1');
    			});
    		</script>
    	<?php
    } );

    You may have to select other fields according to the sample code.

    Thank you 🙂

Viewing 1 replies (of 1 total)

The topic ‘Set price limit’ is closed to new replies.