Skip to content

Instantly share code, notes, and snippets.

@junenacpil29
Created February 1, 2021 06:28
Show Gist options
  • Save junenacpil29/c3a67a6131020603677af00e1b044f6a to your computer and use it in GitHub Desktop.
Save junenacpil29/c3a67a6131020603677af00e1b044f6a to your computer and use it in GitHub Desktop.
add_filter( 'wcv_product_length ', function( $field ) {
$field['custom_attributes'] = array( 'required' => '' );
return $field;
});
add_filter( 'wcv_product_width', function( $field ) {
$field['custom_attributes'] = array( 'required' => '' );
return $field;
});
add_filter( 'wcv_product_height', function( $field ) {
$field['custom_attributes'] = array( 'required' => '' );
return $field;
});
@agostmarc1
Copy link

add_filter( 'wcv_product_weight', function( $field ) {
$field['custom_attributes'] = array( 'required' => '' );
return $field;
});

add_filter( 'wcv_product_length', function( $field ) {
$field['custom_attributes'] = array( 'required' => '' );
return $field;
});

add_filter( 'wcv_product_width', function( $field ) {
$field['custom_attributes'] = array( 'required' => '' );
return $field;
});

add_filter( 'wcv_product_height', function( $field ) {
$field['custom_attributes'] = array( 'required' => '' );
return $field;
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment