Skip to main content
Part of EU Deforestation Regulation (EUDR). On WooCommerce, the Global-e plugin sends eudrDdsReference and eudrTaricCode to Global-e at checkout. WooCommerce has no built-in field for these values, so a developer adds a short code snippet: the code filter.

Before you start

You can check your plugin version by navigating to Plugins → Installed Plugins.
Global-e plugin version under Plugins, Installed Plugins

Set up EUDR with the code filter

Requires: Global-e WooCommerce plugin 1.14.0 or later.
  1. Store the DDS reference and TARIC document code for each product or variation. Your developer decides where the values come from: for example, a custom field on each variation (added by your developer or a custom fields plugin), or an external system such as your ERP or PIM.
  2. Send both values with the code filter. Add the code from The code filter below.
  3. Place a test order and confirm both keys appear when values exist and are omitted when blank.

The code filter

The plugin’s woocommerce_globale_pro_add_cart_product_meta_attributes filter adds key/value pairs to each cart line’s MetaData. The filter reads the values from the variation when there is one, otherwise from the product, so each variation can send its own pair. Example for your theme’s functions.php or a custom plugin. Replace the meta keys with wherever you store the values:
  • Use the keys exactly as written, in camelCase: eudrDdsReference and eudrTaricCode.
  • Leave a key out when there is no value. Never send NA, 0 or -.
  • Send each key from one source only. Keys sent by the filter do not need to be listed in Extra Product Attributes.
  • If you already send EU Product Identifiers with the same filter, add the EUDR keys to the same function. standardcode and mididentifier keep working unchanged.
  • Test on a staging site first and confirm both keys appear on the cart line.

Reference

What gets sent Key points
  • Per variation. A variation sends its own values. A product without variations sends the product’s values.
  • Omit, don’t fake. Leave the value empty when you have none. Never enter NA, 0 or -.
  • Separate from PID. EUDR keys are sent alongside standardcode and mididentifier on the same cart line; they do not replace them.
Quick check before go-live