Skip to content

Commit f40cd33

Browse files
committed
Remove schema validation on construct
1 parent f6b899c commit f40cd33

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

includes/class-scf-json-schema-validator.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,9 @@ class SCF_JSON_Schema_Validator {
4444

4545
/**
4646
* Constructor.
47-
*
48-
* Validates that all required schemas are available on initialization.
49-
* If schemas are missing, registers an admin notice and prevents usage.
5047
*/
5148
public function __construct() {
5249
$this->schema_path = acf_get_path( 'schemas/' );
53-
54-
// Validate schemas exist on initialization (skip during static analysis)
55-
if ( defined( 'ABSPATH' ) && ! $this->validate_required_schemas() ) {
56-
add_action( 'admin_notices', array( $this, 'show_schema_error' ) );
57-
}
5850
}
5951

6052

@@ -165,21 +157,6 @@ public function validate_required_schemas() {
165157
return true;
166158
}
167159

168-
/**
169-
* Display admin notice when required schemas are not available.
170-
*
171-
* @since 6.6.0
172-
*/
173-
public function show_schema_error() {
174-
?>
175-
<div class="notice notice-error is-dismissible">
176-
<p>
177-
<strong><?php esc_html_e( 'Secure Custom Fields Error:', 'secure-custom-fields' ); ?></strong>
178-
<?php esc_html_e( 'Required schema files are missing. Schema validation will not be available. Please ensure all schema files are present in the plugin directory.', 'secure-custom-fields' ); ?>
179-
</p>
180-
</div>
181-
<?php
182-
}
183160
/**
184161
* Gets the validation errors from the last validation attempt.
185162
*

0 commit comments

Comments
 (0)