Skip to content

Configuring Pasporto

This guide details Pasporto's configuration options, field validation rules, and schema markup output.

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).
  • In its own product tab (tab):
    • Registers a "Digital Product Passport (DPP)" tab via the woocommerce_product_tabs filter.
    • 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.
  • Under single product summary (summary):
    • Injected directly into the product summary column via the woocommerce_single_product_summary action hook at priority 28.
    • Appears right above the Add to Cart form.
    • Best for high-impact sustainability badges where customers expect instant visibility before purchasing.

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:

  • 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.
  • 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").
  • Database field: primary_material
  • Format: Text string.
  • Usage: Primary material breakdown or composition summary (e.g., "100% Recycled Cotton", "Aluminium alloy 6061-T6").
  • Database field: recycled_content
  • Format: Numeric float, automatically clamped between 0 and 100.
  • Usage: Certified percentage of post-consumer or pre-consumer recycled material.
  • 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.
  • 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.
  • 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 additionalProperty with appropriate standard names and unit labels.