Skip to content
Extension Foundry

Installing and the first steps

How to install Produktpass for WooCommerce, set it up and make sure your web server lets the passport addresses through.

Produktpass helps you with the battery passport and the battery QR code under Regulation (EU) 2023/1542. The plugin's texts, templates and notes are not legal advice. You remain responsible for your duties and for the accuracy of your data. For a binding answer on your own case, ask a lawyer.

Requirements

  • WordPress 7.0 or newer, WooCommerce 11.1 or newer and PHP 8.2 or newer.
  • Pretty permalinks (Settings > Permalinks) or a host that hands every address to index.php. The plugin never prints an address with index.php in it.
  • For PNG codes the PHP extension GD; without it the plugin offers SVG only and says why.
  • The plugin refuses activation for a whole multisite network; it runs on single sites of a network.

Installing

  1. Install and activate WooCommerce 11.1 or newer.
  2. Install and activate Produktpass for WooCommerce under “Plugins”. The plugin creates its tables and schedules its nightly work.
  3. Open “WooCommerce > Produktpass”. Users who do not see the WooCommerce menu find the plugin under “Products > Produktpass”.

Settings

Under “WooCommerce > Produktpass > Settings” you enter:

  • the responsible economic operator with name, address and contact address,
  • the categories that hold batteries; the overview counts these products and every product with a passport,
  • the address of the passports (resolver base); the plugin checks it before saving it,
  • the languages of the passport values, the badge's position and whether the product page shows the QR code,
  • the page with your legal notice, which every passport page links.

Users who may manage WooCommerce can save; everyone else sees the settings read-only.

Passport addresses, permalinks and the web server

Every passport has a GS1 Digital Link address, such as https://your-shop.example/dpp/01/09520000000479, for single batteries with /21/ and the serial number after it. These addresses reach the plugin only when the web server hands them to WordPress.

Before the plugin saves an address, it requests the address followed by /_ping from your server. Only when the answer comes from this plugin is the address accepted. A resolver host of its own, such as https://id.your-brand.example, must lead to this WordPress site; former addresses keep redirecting with HTTP 301 to the current one.

Serial numbers with a slash

Serial numbers and batches with a slash appear in the address as %2F. Without the setting AllowEncodedSlashes NoDecode, Apache answers such addresses with 404 before WordPress sees them. The setting belongs in the site's VirtualHost; it has no effect in an .htaccess file. Ask your host for it:

AllowEncodedSlashes NoDecode

The plugin's help names the web server your site runs on. nginx passes %2F on unchanged and needs no such setting.

nginx and the folder of the documents

Uploaded documents are stored in wp-content/uploads/produktpass/ under random names; they can be reached only through the passport page. On Apache an .htaccess file protects the folder, on nginx it has no effect. Add this rule to the site's server block there:

location ^~ /wp-content/uploads/produktpass/ {
    deny all;
}

Page caches and CDNs

Passport pages ask cache plugins not to store them with the constant DONOTCACHEPAGE. We checked this for WP Super Cache; for W3 Total Cache, WP Rocket, LiteSpeed Cache and Cache Enabler it is their documented signal.

Browsers and shared caches keep a passport for at most five minutes. Exclude the path of the passport addresses from CDN and server caches, for example at Cloudflare, in LiteSpeed's server cache or in the nginx FastCGI cache, so that a withdrawn passport disappears within those five minutes.

Background work and WP-Cron

The nightly work (checksums, counts, the address and badge checks) runs on WooCommerce's Action Scheduler, which depends on WP-Cron. WP-Cron runs only when someone opens the site; on a quiet shop the work waits.

When work has waited for more than an hour, opening the overview catches up on up to 500 entries and shows a note. For good, a system cron helps that calls wp-cron.php every few minutes. Your host sets it up, for example like this:

*/5 * * * * curl -s https://your-shop.example/wp-cron.php?doing_wp_cron > /dev/null

With the system cron you can switch off WP-Cron on page loads: define( 'DISABLE_WP_CRON', true ); in wp-config.php.

The overview

The overview counts the days to 18.02.2027 and shows “Required since 18 Feb 2027” from that day. Below are your products with their state: no passport, incomplete, ready, published or withdrawn. A click on a state shows only these products; an incomplete passport lists its open points.

With more than 20,000 products the nightly work counts the states; until it is done, the numbers read “being counted”.

Export and backup

“Export all” under “Passports” writes the passports into CSV files, one per template (UTF-8, semicolon, decimal comma), and the latest published version of each passport as JSON. Batteries with a serial number that Produktpass Pro created are in the files too, even when Pro is no longer active.

You download the change log of a passport as CSV with its versions. Every version carries a checksum (SHA-256), which the nightly work checks.

Languages

The admin is in German and English, and you enter the passport values in German and English. Under “Settings > Languages of the passport values” you decide which languages the passport page offers: at first the site's language and English; any of the 24 official EU languages can be chosen.

The passport page shows the visitor's language when it is on the list, otherwise the first one of the list. For a language without an entered value it shows the German or English value and marks it. When you remove a language from the list, the values stay stored.

Deactivating and deleting

Deactivating changes no data. Deleting keeps the tables, documents and settings, unless you ticked “Delete data when the plugin is deleted” under “Settings”.

You can tick it only once you exported everything after the last change or confirm “I waive the backup”. If that no longer holds when you delete, the plugin keeps everything and writes to the WooCommerce log how to delete the data. Deleting always unschedules the nightly work.

Support

Write to support@extensionfoundry.com. Name the versions of WordPress, WooCommerce and Produktpass (the plugin shows them under “Help”) and what you did. Send no access data. Report vulnerabilities on the page Security.

Back to the help for Produktpass for WooCommerce