SShortSingh.
Back to feed

Why old WooCommerce checkout snippets fail on the Checkout block and how to add fields

0
·7 views

Stores using the WooCommerce Checkout block, the default for new installs since version 8.3, do not run most classic checkout hooks, so older custom field snippets fail silently. The recommended approach is the Additional Checkout Fields API, stable since version 8.9, which is best placed in a small plugin so it persists across theme changes. The article's example registers a namespaced purchase order field with sanitization and validation callbacks. Developers must also watch for namespacing requirements, storage location options, and a hook name discrepancy between the documentation and the source code. Once registered, the field appears in admin, thank-you pages and emails, and the CheckoutFields helper can retrieve it in code.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

UIDAI Unveils Lighter Sub-AUA/Sub-KUA Route for Low-Volume Aadhaar Users

On 29 September 2026, UIDAI announced five initiatives at Aadhaar Samvaad in Kolkata, including a new LITE framework for Sub-AUAs and Sub-KUAs. Sub-AUAs and Sub-KUAs access Aadhaar services through an existing AUA or KUA, which handles Yes/No authentication and e-KYC respectively. The LITE framework is intended to simplify and speed up onboarding for entities with lower authentication volumes, including government and eligible non-government bodies. Under existing rules, AUAs and KUAs need UIDAI approval before appointing a Sub-AUA or Sub-KUA, and they remain jointly liable for compliance. The article notes that UIDAI has not yet released full details of the LITE route, so regulated entities such as lenders and fintechs are advised to prepare while awaiting clarification.

0
ProgrammingDEV Community ·

Money Tracker app explains bill import without bank logins, using confirm-before-save

The developer of Money Tracker, an expense app for Android and iOS, describes its statement and bill import feature, which is available on the Premium tier. Users export a file such as a PDF or CSV from their bank or card issuer, then upload it to the app, which parses it into draft entries. Each draft must be reviewed and confirmed by the user before it is saved to their records. The developer stresses that the app never asks for bank credentials and does not maintain ongoing connections to accounts, unlike bank-sync services. The post presents this as a narrower, more controlled alternative to automatic open-banking sync.

0
ProgrammingDEV Community ·

Contact form shows success but enquiries go missing: how to trace one test message

A contact form can display a success message while the enquiry never reaches the team's mailbox. The recommended approach is to follow a single identifiable test submission through the form, the sending route, and the receiving mailbox, rather than changing the mail plugin or DNS first. A successful wp_mail() return only means the sending method processed the request without error, not that the recipient got the email. Form plugins may also have demo or skip-mail settings that show success without sending, so these should be checked. Each finding, such as no matching record, a sending error, or provider acceptance, points to a different next check.

0
ProgrammingDEV Community ·

Handling Email API Timeouts in Order Report Delivery

An email API timeout should be treated as an unknown delivery state rather than a confirmed failure, since the server may have accepted the message even though no response arrived. The article recommends recording an idempotency key before the first send attempt and separating connection, request, and delivery deadlines to pinpoint where delays occur. Attachment generation should move out of the synchronous request path, with the web request only enqueuing a durable job that a worker processes. Retries are only safe when the receiver supports idempotency or the outcome can be reconciled, otherwise duplicate emails may be sent. Deadlines should be chosen per workflow phase and kept in configuration.