Last active
March 9, 2020 06:22
-
-
Save bentasm1/d0b30c43475faf87434fb39dccb40e85 to your computer and use it in GitHub Desktop.
WC Vendors Pro -- Require a minimum, and a maximum price for vendors when adding/editing a product
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* WC Vendors Pro -- Require a minimum, and a maximum price for vendors when adding/editing a product */ | |
add_filter( 'wcv_product_price', 'price_min_max' ); | |
function price_min_max( $args ){ | |
$args[ 'custom_attributes' ] = array( | |
'data-rules' => 'decimal|range[1,20]', | |
'data-error' => __( 'Price should be a number and between $1 and $20', 'wcvendors-pro' ) | |
); | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if for the sale price
how to limit selling prices for vendors?