How to display the current and parent category in WordPress
Need to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
A Barcelona company that invoices other companies is about to move from PDF invoices to structured ones, with status messages on top. The base is a law of 2022, a regulation of 2026 and a ministerial order of October 2026, all in the BOE. I am Mariusz Szatkowski, a PHP developer based in Gdynia who works only remotely and in writing. This page reads those three texts for one purpose: what a custom PHP invoicing module has to produce, store and send. I am not a lawyer, and the dates below are quoted from the BOE, not calculated.

The square between the city hall and the Generalitat palace in Barcelona. Image by Herodotptlomeu, licensed CC BY-SA 4.0, via Wikimedia Commons.
Ley 18/2022, de 28 de septiembre, changed article 2 bis of Ley 56/2007 in its article 12. The new text says that all empresarios y profesionales must issue, send and receive electronic invoices in their commercial relations with other empresarios y profesionales, and that recipient and issuer must provide information on the invoice statuses.
The same article sets rules that shape a module directly:
The point about the receiver matters for architecture. A customer cannot make you use its portal as the only route, so a module has to carry its own export and not depend on one vendor’s format.
The final provision eighth of Ley 18/2022 gives article 12 effect for businesses with annual billing above eight million euros one year after the approval of the implementing regulation, and for the rest two years after. It also says that the entry into force of article 12 depends on obtaining the EU exemption from articles 218 and 232 of Directive 2006/112/CE. I did not check the exemption separately, and the regulation proceeds on the basis of that provision.
Real Decreto 238/2026, de 25 de marzo, is the regulation. The BOE record gives publication in the BOE num. 79, de 31/03/2026, and entry into force on 20/04/2026. Its final provision fourth defers the effective application and counts from the entry into force of the ministerial order of its final provision third:
Orden HAC/1028/2026, de 2 de octubre, is that order. The BOE record gives publication in the BOE num. 247, de 05/10/2026, and entry into force on 06/10/2026. Its final provision says it enters into force the day after publication and that this starts the periods of the final provision eighth of Ley 18/2022 and of the regulation. The texts do not print calendar end dates, so the counting is something to confirm with a tax adviser.
Two more rules sit in the text. The public e-invoicing solution has to be available at least two months before the first effective application of the regulation, which both the regulation and the order state. And during the first twelve months after the regulation takes effect for businesses above eight million euros, they must attach a PDF to the electronic invoice, unless the recipient voluntarily and expressly accepts the original format. That PDF goes to the recipient by any means and never to the public solution.
Article 7.1 of the regulation requires a structured message that follows the EN16931 semantic data model of the European Committee for Standardization, in one of four syntaxes: CII, UBL, an EDIFACT invoice message or a Facturae message.
The public solution of the tax agency is narrower. Under article 11.2 of the regulation and article 3.1 of the order, invoices issued or interconnected through it follow EN16931 in the UBL syntax, with the technical specifications on the electronic office of the tax agency. The order adds that these invoices cannot carry other embedded files, which rules out the habit of attaching a PDF inside the XML.
Other rules from article 7 that touch a data model:
Article 5 of the regulation describes the Spanish system as the set of private invoice exchange platforms that meet the rules plus the public solution run by the tax agency, which also acts as invoice repository. Invoicing can go through private platforms, the public solution or both.
Article 6.2 sets the duty that matters most for a custom module. Platforms and systems that do not use the public solution to issue invoices must send, at the same time as issuing, a faithful electronic copy of each invoice in the UBL syntax to the public solution. The order adds in article 4 that the copy is marked in a field called “indicador de copia”, that it keeps the minimum content, and that it carries no embedded files. If the public solution is used for issuing, no copy is sent, because the invoice is already at the disposal of the administration.
Article 6.3 says that a business receiving through a private platform must publish its invoice entry points in all communications with other businesses. Without a published entry point, the entry point is the public solution.
Access to the public solution uses electronic certificates valid at the electronic office of the tax agency, under article 11 of the order. Article 11.10 of the regulation says that access and the uses it provides are free of charge.
Article 10 of the regulation obliges recipients to inform the issuer of the commercial acceptance or rejection of the invoice with its date, and of the full payment with its date. Article 12 adds that the communication of full payment or rejection to the public solution is mandatory, whichever route the invoice took. Without a rejection or a later corrective invoice, the invoice is presumed accepted.
The deadline is a maximum of four calendar days, excluding Saturdays, Sundays and national holidays, from the date of the event. Recipients also report the due date of payment. The order, in its article 7, sets the syntax of these messages to UBL and says the payment duty counts as fulfilled when the invoice itself, or its copy, carries a payment date that is earlier than or equal to the issue date and equal to the date of the operation, unless the recipient reports the payment status expressly.
For natural persons with annual operations up to eight million euros, the transitional provision third makes reporting the invoice statuses voluntary until twelve months after the date set in the final provision fourth, point b.
Article 3 applies the duty when the recipient is an empresario or profesional with its seat, a permanent establishment or, failing that, its domicile or habitual residence in Spain. Article 4 exempts operations documented with simplified invoices, unless they are qualified simplified invoices under article 7.2 of the invoicing regulation. The ministry can exclude further operations by order, in principle for a limited time. The additional provision second also excludes certain market-operator activities and operations settled through named airline clearing houses.
The texts give no code, so what follows is design reading.
The deadline arithmetic is the part that is easy to get wrong. A sketch with the procedural date functions from php.net, where the list of national holidays comes from the caller:
<?php
declare(strict_types=1);
/**
* Adds a number of working days: Saturdays, Sundays and the given
* holiday dates (Y-m-d) do not count. Maximum is four per the BOE text.
*/
function statusDeadline(string $eventDate, array $holidays, int $days = 4): string
{
$d = date_create_immutable($eventDate);
$left = $days;
while ($left > 0) {
$d = date_modify($d, '+1 day');
$isWeekend = (int) date_format($d, 'N') >= 6;
$isHoliday = in_array(date_format($d, 'Y-m-d'), $holidays, true);
if (!$isWeekend && !$isHoliday) {
$left--;
}
}
return date_format($d, 'Y-m-d');
}The texts say “four calendar days, excluding Saturdays, Sundays and national holidays”. The sketch counts four days that are neither a weekend nor a holiday, which is one possible reading. If your adviser reads it differently, the function is the only place to change.
A few lines are enough: the size band of the company, how invoices are produced today and which platform, if any, the customers use. The first written estimate is free, and it separates the model, the exports and the status messages. The general offer is on the PHP developer page, and the contact page is where the first message goes.
Examples of my work.
The Port Brzeźno Rope Park is a place where both children and adults can experience an unforgettable adventure at height with a good dose of adrenaline in Gdańsk, Poland.
The Quality Watch project was created with the aim of presenting the services of a company specializing in improving customer service standards, quality management, customer experience, customer journeys and customer intelligence.
The Dune City website was built for a prestigious apartment complex located on the 10-kilometre spit separating the Baltic ...
Describe your project by e-mail. I reply within 24 hours.
Describe your projectNeed to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
Need to get the URL of the first image or link in an article? Prefer DOMDocument over regex. Ready-made WordPress PHP for developers.
On 1 December 2026 Taylor Otwell shipped the Laravel Rust beta, and Laravel Go followed a day later. What the framework contains, what the 18x benchmark really measures, what happens to Laravel PHP and WordPress, and when a rewrite makes sense.
Custom WordPress engineering and architecture.
Scalable headless, ERP, and AI architecture for enterprise.
Stores, checkout flow, and sales logic.
Stability, updates, and post-launch support.
What the monthly care fee covers and what changes it.
Business process automation around WordPress and company systems.
Headless WordPress, Sanity, Strapi, and Contentful with Astro or Next.js.
Astro, MDX, edge delivery, and Core Web Vitals measured on real traffic.

How to start as a WordPress developer in 2026. Local environment, theme and plugin development, REST API and headless paths, security and Core Web Vitals. A practitioner playbook that does not waste your first month.

WordPress 7.0 with AI Client against Astro 7 with the Rust compiler and Vite 8. Speed, cost, SEO and security compared, plus the real bill for my own Astro 6 to 7 migration.

A detailed comparison table of EmDash CMS and WordPress across architecture, security, plugins, AI features, content model, hosting, and ecosystem maturity.