WooCommerce is testing a React-based Settings UI for extensions while retaining legacy PHP behavior. Payment gateway extensions should verify that text, secret, select, toggle, and custom fields save correctly and produce the intended runtime configuration.
Use this for gateway developers, agencies, and store operators testing extension settings before enabling a new WooCommerce Settings UI on production.
Quick answer
WooCommerce Settings UI Gateway Field Save Regression Test should be handled with a narrow evidence-first workflow: map fields, test save cases, read stored values, then verify the result before making broader changes.
What to check first
- Inventory every gateway field, its option key, default, validation rule, and secret-masking behavior.
- Save valid, blank, invalid, and boundary values with an administrator and a restricted test role.
- Read the stored option directly and compare it with the value shown after the screen reloads.
- Run a sandbox payment to prove the gateway uses the newly saved runtime value.
- Disable the feature and confirm legacy settings still read the same option data.
Diagnostic table
Use this table to keep the work practical. It connects the symptom to evidence and a verification step.
| Action | Evidence to collect | How to verify |
| Map fields | Inventory every gateway field, its option key, default, validation rule, and secret-masking behavior. | Every field reloads with the intended value or masking behavior. |
| Test save cases | Save valid, blank, invalid, and boundary values with an administrator and a restricted test role. | Invalid values are rejected without corrupting the prior saved option. |
| Read stored values | Read the stored option directly and compare it with the value shown after the screen reloads. | The gateway runtime uses the same mode, credential, and webhook settings. |
| Run sandbox payment | Run a sandbox payment to prove the gateway uses the newly saved runtime value. | Legacy and new settings screens can switch without losing data. |
Why this usually happens
- A custom field can render correctly but fail to register its save handler.
- Secret fields may overwrite a stored credential with a masked placeholder.
- Client-side validation and legacy PHP validation can disagree.
- A settings notice can appear even when a gateway reads a different option key at runtime.
Useful command or data shape
Adapt paths, IDs, and privacy handling to the site before running commands or storing data on production.
wp option get woocommerce_example_settings --format=json
wp user create gateway_tester tester@example.com --role=shop_manager
# Run one sandbox authorization and inspect the gateway debug log.
Safe fix order
Do the work in a sequence that makes each result easy to prove. Stop if a step produces new evidence that changes the incident scope.
- Map fields
- Test save cases
- Read stored values
- Run sandbox payment
- Test rollback
What to tell the client or owner
Give the extension owner a field-by-field matrix with option keys, save cases, stored values, runtime proof, and unresolved custom controls.
Production verification checklist
- Every field reloads with the intended value or masking behavior.
- Invalid values are rejected without corrupting the prior saved option.
- The gateway runtime uses the same mode, credential, and webhook settings.
- Legacy and new settings screens can switch without losing data.
Mistakes to avoid
- Do not judge the fix by one browser or the homepage only.
- Do not delete evidence before recording usernames, file paths, timestamps, and response headers.
- Do not add a cache, security, or tracking plugin while the original problem is still unclear.
- Do not leave test users, temporary debug logs, or broad API keys active after verification.
When HandL WP should help
Bring in help when this affects leads, checkout, search visibility, malware risk, paid media reporting, or a client production site. HandL WP can trace the issue through WordPress, hosting, cache, tracking, and Search Console, then verify the workflow after the technical fix.
If this is active on a production site, test WooCommerce extension updates before production.
Related HandL WP guides
Use these related guides when the same issue touches tracking, security, checkout, or crawler visibility.
Helpful references