You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
REST API: differentiate between checkbox and toggle boolean settings
Toggle settings serialise to 'Yes'/'No' while checkbox settings serialise
to '1'/'' to match how each field type is stored. Rename the unreleased
schema format string 'yes_no' -> 'yes-no' for consistency with the existing
'hex-color' format, and add a dedicated 'checkbox' format with its own
prepare/response handling. Adds PHPUnit coverage for both formats.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/Helper/Helper_Options_Fields.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -347,7 +347,7 @@ public function get_registered_fields() {
347
347
'desc2' => esc_html__( 'Add rules to dynamically enable or disable the PDF. When disabled, PDFs do not show up in the admin area, cannot be viewed, and will not be attached to notifications.', 'gravity-pdf' ),
348
348
'schema' => [
349
349
'type' => 'boolean',
350
-
'format' => 'yes_no',
350
+
'format' => 'yes-no',
351
351
],
352
352
],
353
353
@@ -645,7 +645,7 @@ public function get_registered_fields() {
645
645
'description' => __( 'Force the PDF to be temporarily saved to the filesystem during form submission (deprecated). Use the gfpdf_post_save_pdf hook instead.', 'gravity-pdf' ),
0 commit comments