Back to all projects

Vouchergenerationpluginforaspasalon

2 min. read
Visit site
Tech stack
PHP | Woocommerce | DOMpdf

Many WooCommerce store owners face the same problem: manually issuing vouchers takes hours, and off-the-shelf plugins often fail at the worst possible moment. If you run a spa, a hotel, or a service-based business, your goal is to make sales—not to struggle with broken code.

Many off-the-shelf solutions available on the market offer only rigid templates that are difficult to adapt to a company’s branding. Worse still, premium versions that allow for HTML code editing are often bloated with unnecessary code. Users of such plugins frequently complain about:

  • Compatibility issues: WooCommerce updates can break the block editor (Gutenberg).
  • Errors in file generation: Uncertainty as to whether every purchased voucher has been correctly generated and sent.
  • Poor support: Reports regarding errors in PDF generation can take a long time to resolve, and in the meantime, clients lose money.

Proprietary solution – custom plugin

Instead of relying on third-party modules - which can be unreliable or come with a cost - I implemented a custom solution for a client in the spa industry, built using the DOMpdf library. Rather than using a "heavy" plugin, I opted for lightweight, stable, and fully controlled code that performs exactly the required tasks:

  1. Full customization: The client can specify the amount and enter the relevant details (recipient and sender names), resulting in a ready-to-use PDF voucher.
  2. Lightweight performance: The solution does not impact the store's loading speed and does not conflict with content editors.
  3. End-to-end automation: The entire process—from the initial purchase to the delivery of an email containing the voucher as an attachment—is fully automated.

Safeguards against failures and anomalies

The biggest drawback of automation is the fear that something might go wrong—for instance, an email failing to reach a customer due to a temporary payment error or issues with the mail server.

In my solution, I have implemented a fail-safe mechanism:

  • Any voucher that fails to be delivered due to technical reasons is automatically flagged and moved to a secure, isolated folder.
  • The store owner has access to this list and can resend an unsent voucher with a single click.

Thanks to this, handling exceptions takes seconds, rather than hours spent searching for the root causes in server logs.

Otherprojects

Product catalog for industrial automation

Case study of a website implementation for a distributor in the industrial automation sector, built using WooCommerce and ACF.

  • WooCommerce
  • Wordpress
  • ACF
  • Custom theme
Product page view in the industrial automation sector

Trainer website with a service management system

A website for a trainer, designed from the ground up, featuring a streamlined purchasing path, a custom content management system, and integration with mBank.

  • Redesign
  • Next.js
  • Sanity
  • E-commerce mBank
Project hero section

Crane rental website

For this crane rental company website, the focus was on a stark, simple design—ensuring that conversion rates wouldn't be compromised.

  • Sanity
  • Next.js
  • Brutalizm
Hero section