---
title: Filter automatic product schema
url: "https://www.seopress.org/support/hooks/filter-automatic-product-schema/"
lang: en-US
updated: 2025-01-02
hook_name: seopress_schemas_auto_product_json, seopress_schemas_auto_product_html
required_version: 4.7, 3.5
---

# Filter automatic product schema

- **Hook name:** `seopress_schemas_auto_product_json, seopress_schemas_auto_product_html`
- **Required version:** 4.7, 3.5

```php
add_filter('seopress_schemas_auto_product_json', 'sp_schemas_auto_product_json');
function sp_schemas_auto_product_json($json) {
	//returns schema as an array with 'property' => 'value'
	return $json;
}

function sp_auto_product_html($jsonld) {
	$jsonld = '<script type="application/ld+json">Full documentation here: https://schema.org/Product</script>';
	return $jsonld;
}
add_filter('seopress_schemas_auto_product_html','sp_auto_product_html');
```

Source: [https://gist.github.com/wp-seopress/e62e798f60fdeff0a039c920a073fd30](https://gist.github.com/wp-seopress/e62e798f60fdeff0a039c920a073fd30)



