WordPress at a glance
function is not described


Products::get_item_schema() public WC 1.0

Adds properties that can be embed via ?_embed=1.

{} It's a method of the class: Products{}

No Hooks.


Array. Nothing.


$Products = new Products();

Code of Products::get_item_schema() WC 5.2.2

public function get_item_schema() {
	$schema = parent::get_item_schema();

	$properties_to_embed = array(

	foreach ( $properties_to_embed as $property ) {
		$schema['properties'][ $property ]['context'][] = 'embed';

	$schema['properties']['last_order_date'] = array(
		'description' => __( "The date the last order for this product was placed, in the site's timezone.", 'woocommerce' ),
		'type'        => 'date-time',
		'context'     => array( 'view', 'edit' ),
		'readonly'    => true,

	return $schema;