Configuring Pasporto
This guide details Pasporto’s configuration options, field validation rules, and schema markup output.
Settings screen
Section titled “Settings screen”Navigate to WooCommerce > Product Passport (DPP) in your WordPress administration panel. This page is accessible to any user with the manage_woocommerce capability.
Settings are stored in the single WordPress option pasporto_settings:
| Setting | Default | Description |
|---|---|---|
| Enable Product Passports | 1 (On) |
Activates or pauses passport rendering on product pages and JSON-LD schema enrichment. Turning this off hides frontend output without deleting saved product meta. |
| Display Location | tab |
Controls where passport data is output on single product pages. Options: tab (In its own product tab) or summary (Under single product summary). |
Display locations compared
Section titled “Display locations compared”- In its own product tab (
tab):- Registers a “Digital Product Passport (DPP)” tab via the
woocommerce_product_tabsfilter. - Positioned after native WooCommerce tabs with priority
40. - Best suited for detailed technical data, specifications, or complex supply chain descriptions without cluttering the upper buy section.
- Registers a “Digital Product Passport (DPP)” tab via the
- Under single product summary (
summary):- Injected directly into the product summary column via the
woocommerce_single_product_summaryaction hook at priority28. - Appears right above the Add to Cart form.
- Best for high-impact sustainability badges where customers expect instant visibility before purchasing.
- Injected directly into the product summary column via the
Field specifications and validation
Section titled “Field specifications and validation”All passport attributes are managed in the classic product editor under the General tab of the Product data box:
1. Unique Product ID (UPI / GTIN)
Section titled “1. Unique Product ID (UPI / GTIN)”- Database field:
upi - Format: Text string (sanitized with
sanitize_text_field). - Usage: Accepts GS1 Digital Links, GTIN (EAN/UPC), EPC, or proprietary passport identifiers provided by suppliers.
2. Passport URL
Section titled “2. Passport URL”- Database field:
passport_url - Format: Valid URL (sanitized with
esc_url_raw). - Usage: Address of the public landing page or registry hosting the digital passport. Generates the Open the product passport button (
target="_blank" rel="noopener noreferrer").
3. Primary Material
Section titled “3. Primary Material”- Database field:
primary_material - Format: Text string.
- Usage: Primary material breakdown or composition summary (e.g., “100% Recycled Cotton”, “Aluminium alloy 6061-T6”).
4. Recycled Content (%)
Section titled “4. Recycled Content (%)”- Database field:
recycled_content - Format: Numeric float, automatically clamped between
0and100. - Usage: Certified percentage of post-consumer or pre-consumer recycled material.
5. Carbon Footprint (kg CO2e)
Section titled “5. Carbon Footprint (kg CO2e)”- Database field:
carbon_footprint - Format: Non-negative numeric float (values below 0 are discarded).
- Usage: Declared cradle-to-gate or lifecycle greenhouse gas emissions expressed in kilograms of carbon dioxide equivalent per item unit.
6. Circularity Class
Section titled “6. Circularity Class”- Database field:
circularity_class - Format: Selected value among:
""(Not specified),A,B,C,D,E. - Usage: Manufacturer-declared durability or circularity rating. Pasporto never computes or alters this grade.
7. Declaration of Conformity
Section titled “7. Declaration of Conformity”- Database field:
doc_url - Format: Valid URL (sanitized with
esc_url_raw). - Usage: Direct link to the EU declaration of conformity (DoC) PDF or web document. Renders as a clickable link in the passport table.
Structured data integration (JSON-LD)
Section titled “Structured data integration (JSON-LD)”Pasporto does not inject competing, duplicate schema blocks. Instead, it hooks into WooCommerce’s native schema generator using the woocommerce_structured_data_product filter.
When passport fields are populated, Pasporto extends the existing Product graph node:
{ "@context": "https://schema.org/", "@type": "Product", "name": "Eco Jacket", "identifier": "0123456789012", "additionalProperty": [ { "@type": "PropertyValue", "name": "digitalProductPassport", "value": "https://passports.example.org/dpp/0123456789012" }, { "@type": "PropertyValue", "name": "primaryMaterial", "value": "Organic cotton 80%, recycled polyester 20%" }, { "@type": "PropertyValue", "name": "recycledContentPercentage", "value": "35", "unitText": "%" }, { "@type": "PropertyValue", "name": "carbonFootprint", "value": "4.2", "unitText": "kg CO2e" }, { "@type": "PropertyValue", "name": "circularityClass", "value": "B" }, { "@type": "PropertyValue", "name": "declarationOfConformity", "value": "https://example.com/conformity/eco-jacket.pdf" } ]}- If WooCommerce has not set a top-level
identifier, Pasporto populates it using the Unique Product ID. - Each filled sustainability attribute is appended to
additionalPropertywith appropriate standard names and unit labels.