Skip to content

Instantly share code, notes, and snippets.

@SiR-DanieL
Created May 5, 2016 06:30
Show Gist options
  • Save SiR-DanieL/7a3a4ac33ed70182fb18bece143c03a4 to your computer and use it in GitHub Desktop.
Save SiR-DanieL/7a3a4ac33ed70182fb18bece143c03a4 to your computer and use it in GitHub Desktop.
add_action( 'wcpv_shortcode_registration_form_validation', 'wc_custom_vendors_validation', 10, 2 );
function wc_custom_vendors_validation( $errors, $form_items ) {
if ( empty( $form_items['vendor_description'] ) ) {
$errors[] = __( 'Vendor Description is a required field.', 'woocommerce-product-vendors' );
}
return $errors;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment