
Măslinescu® — a WooCommerce olive-oil shop with its own ops room
maslinescu.ro ↗Context
Măslinescu® sells olive oil online at maslinescu.ro and in a physical store. The shop runs on WooCommerce with HPOS enabled and a custom theme I've been building since April 2024. In 2026 the work moved from the theme to a set of dedicated plugins, each with its own repository, tests and deploy pipeline.
The problem
A growing store gets fragile in quiet ways. A PHP fatal on checkout or an order email that never arrives costs sales, and usually nobody notices until a customer calls. At the same time the business wanted more from the shop itself: a loyalty program that works both online and at the till, richer reviews, and tools the team can manage without asking a developer.
What I built
- Măslinescu® Club — a loyalty program with tiers based on spend over a rolling 12 months. Members are promoted, warned, given a grace period and only then moved down a tier. Rewards are real WooCommerce coupons locked to the member's email. There are eight transactional emails, an early-return nudge for new members, a cohort report for first-to-second order conversion and a club box on user and order screens.
- An AI shopping assistant — a chat on the shop that searches products by taste, use or cultivar, checks live stock and pre-orders, recommends oils like a sommelier (with pairings and recipes), answers shipping and returns questions from the shop's own policy pages and adds products to the cart. It is read-only: it never sees customer or order data, never invents discounts or delivery dates, and sends complaints to the contact page. The model runs behind a Cloudflare Worker, with signed requests, bot protection and daily usage caps.
- Order statuses that follow the parcel. A WP-CLI job, run by cron, reads the AWB tracking from the Fan Courier API in batches and moves each order along: processed → handed to the courier → completed, or to a custom refused delivery status, which also asks the team to refund card payments. Every change leaves an order note, each run reports to Loki and errors reach Slack. Re-running it is safe: an order only ever moves one step forward.
- A cash-register REST API so purchases made in the physical store count towards the club. It uses Application Passwords and a dedicated role that can only reach the club routes, and in-store sales become orders in the customer's account without touching web stock or invoicing.
- Photo and video reviews — images are re-encoded and stripped of metadata; videos upload straight from the browser to Bunny Stream, so large files never pass through PHP.
- Customer restrictions managed from wp-admin, with normalised email matching and an HPOS-compatible order box.
- Greeting cards for orders sent as gifts, and a tool that prints the store's physical gift cards as A4 PDF sheets.
- An Overview dashboard in wp-admin where every plugin contributes a card.
Under the hood
Every plugin is namespaced and passes composer check: PHPCS with WordPress Coding Standards, PHPStan level 5 and PHPUnit with WP_Mock. GitHub Actions runs the checks, builds a clean dist/ and deploys stage to staging and main to production.
For operations, a small mu-plugin sends every event to Loki and only errors to Slack, keeping labels low-cardinality and personal data out of indexed fields. Grafana and Prometheus run in Docker behind a Cloudflare Tunnel, with dashboards provisioned from files. The same server also hosts the store's Typesense search.
Result
Problems now show up in Slack before they reach customers, orders update themselves as parcels move, customers get product advice at any hour, and store purchases finally count in the same loyalty program as online orders. Every change ships through the same checks and the same pipeline, which makes a fast-moving shop much safer to change.
Stack
WordPress, WooCommerce (HPOS), PHP, WooCommerce REST API, Action Scheduler, WP-CLI, Fan Courier API, Cloudflare Workers, Turnstile, Bunny Storage & Stream, Grafana, Loki, Prometheus, Docker, Cloudflare Tunnel, GitHub Actions.
Technologies:
- WooCommerce
- PHP
- REST API
- Fan Courier API
- Cloudflare Workers
- Grafana
- Loki
- GitHub Actions
Share on: