diff --git a/inc/woocommerce.php b/inc/woocommerce.php index 81f53f03..81d200ae 100644 --- a/inc/woocommerce.php +++ b/inc/woocommerce.php @@ -230,6 +230,10 @@ function ppom_check_validation( $product_id, $post_data, $passed = true ) { $passed = apply_filters( 'ppom_before_fields_validation', $passed, $field, $post_data, $product_id ); + if ( $passed && ( ! isset( $field['required'] ) || 'on' !== $field['required'] ) ) { + continue; + } + if ( empty( $field['data_name'] ) && empty( $field['required'] ) &&