Created
September 3, 2016 14:07
-
-
Save fervous/badc146c8967781e36e154b68a4609e5 to your computer and use it in GitHub Desktop.
require price
This file contains 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
/* PRICE REQUIRED */ | |
function wcv_product_price_required( $args ) { | |
$args[ 'custom_attributes' ] = array( | |
'data-rules' => 'required', | |
'data-error' => __( 'The price field is required- please add a price for your product.', 'wcvendors-pro' ) | |
); | |
return $args; | |
} | |
add_filter( 'wcv_product_price', 'wcv_product_price_required' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment