Automattic\WooCommerce\StoreApi\Schemas\V1\Ucp
UcpProductSchema{}└─ ProductSchema
Product schema whose item responses carry raw strings, for the UCP catalog routes.
Agents compare titles and SKUs literally, so the storefront HTML formatter (texturized quotes, 10x20 to 10×20) would corrupt what they match on.
No Hooks.
Usage
$UcpProductSchema = new UcpProductSchema(); // use class methods
Methods
- protected prepare_html_response( $response )
Changelog
| Since 11.3.0 | Introduced. |
UcpProductSchema{} UcpProductSchema{} code WC 11.3.0
class UcpProductSchema extends ProductSchema {
/**
* The schema item name.
*
* @var string
*/
protected $title = 'ucp-product';
/**
* The schema item identifier.
*
* @var string
*/
const IDENTIFIER = 'ucp-product';
/**
* Return content unformatted; the UCP mapper derives plain text itself.
*
* @param string|array $response Data to format.
* @return string|array
*/
protected function prepare_html_response( $response ) {
return $response;
}
}