Skip to content

Instantly share code, notes, and snippets.

@digitalchild
Last active December 29, 2020 07:54
Show Gist options
  • Save digitalchild/f900dbf8bf0bd2d44872d8955adc46df to your computer and use it in GitHub Desktop.
Save digitalchild/f900dbf8bf0bd2d44872d8955adc46df to your computer and use it in GitHub Desktop.
Set a range on the price field for WC Vendors Pro
<?php
add_filter ('wcv_product_price', 'price_min_max');
add_filter ('wcv_product_sale_price', 'price_min_max');
function price_min_max ($args) {
$args ['custom_attributes'] = array (
'data-parsley-range' => '[10, 100]'
);
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment