Home / Admin / Set a minimum, and maximum price for products
Duplicate Snippet

Embed Snippet on Your Site

Set a minimum, and maximum price for products

Set a minimum, and maximum price for products

Code Preview
php
<?php
add_filter( 'wcv_product_price', 'price_min_max' );
function price_min_max( $args ) {
$args['custom_attributes'] = array(
    'min'                        => 3,
    'max'                        => 200,
    'data-parsley-type'          => 'number',
    'data-parsley-range-message' => __( 'Price must be between 3 and 200', 'wcvendors-pro' ),
    'pattern'                    => '\d*',
);
return $args;
}

Comments

Add a Comment